summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-01-30 15:46:00 -0800
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:44:36 +0900
commit7844862c3be3cf98e9d8d89dac58156110ab93b4 (patch)
tree6c939e0d48ee626d067563d70a7d6b206ad6cec8
parenta523d0001a77fec17f3f72a77b49289b18445f98 (diff)
downloadlinux-3.10-7844862c3be3cf98e9d8d89dac58156110ab93b4.tar.gz
linux-3.10-7844862c3be3cf98e9d8d89dac58156110ab93b4.tar.bz2
linux-3.10-7844862c3be3cf98e9d8d89dac58156110ab93b4.zip
zram: delay pending free request in read path
Sergey reported we don't need to handle pending free request every I/O so that this patch removes it in read path while we remain it in write path. Let's consider below example. Swap subsystem ask to zram "A" block free by swap_slot_free_notify but zram had been pended it without real freeing. Swap subsystem allocates "A" block for new data but request pended for a long time just handled and zram blindly free new data on the "A" block. :( That's why we couldn't remove handle pending free request right before zram-write. Change-Id: Ib4409bfad7b1ae263e2708c74875c322da72c7b3 Signed-off-by: Minchan Kim <minchan@kernel.org> Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Jerome Marchand <jmarchan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/block/zram/zram_drv.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index a376109110f..34c1a229074 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -534,7 +534,6 @@ static int zram_bvec_rw(struct zram *zram, struct bio_vec *bvec, u32 index,
if (rw == READ) {
down_read(&zram->lock);
- handle_pending_slot_free(zram);
ret = zram_bvec_read(zram, bvec, index, offset, bio);
up_read(&zram->lock);
} else {