* [PATCH] zram: avoid calling bio_endio() before io complete
[not found] <CGME20181220025430eucas1p2850d6fc8565162908f0540db57d4ec32@eucas1p2.samsung.com>
@ 2018-12-20 2:54 ` Huijin Park
0 siblings, 0 replies; only message in thread
From: Huijin Park @ 2018-12-20 2:54 UTC (permalink / raw)
To: Minchan Kim, Nitin Gupta, Sergey Senozhatsky
Cc: Huijin Park, Huijin Park, Jungseung Lee, linux-kernel, linux-block
When the bio is given as parameter, zram calls the bio_endio() with
given bio after zram io finished.
However in the case of partial writing, the __zram_bvec_read() calls
the bio_endio() with the given bio regardless of the write operation.
In other words, the bio_endio() may be called at an unwanted time.
So this patch avoids calling bio_endio() with given bio before
writing is completed.
Signed-off-by: Huijin Park <huijin.park@samsung.com>
---
drivers/block/zram/zram_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 4879595..b3d3ba2 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1226,7 +1226,7 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
if (!page)
return -ENOMEM;
- ret = __zram_bvec_read(zram, page, index, bio, true);
+ ret = __zram_bvec_read(zram, page, index, NULL, true);
if (ret)
goto out;
--
1.7.9.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-20 2:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20181220025430eucas1p2850d6fc8565162908f0540db57d4ec32@eucas1p2.samsung.com>
2018-12-20 2:54 ` [PATCH] zram: avoid calling bio_endio() before io complete Huijin Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).