aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-01-30 15:46:00 -0800
committerAlex Shi <alex.shi@linaro.org>2015-05-11 19:31:08 +0800
commitee76411779c7fb286de437bd15367ff39ae88e6a (patch)
tree7871599b04402b03c641f201b2ab0bb0bd5500cb /drivers
parentfbd4d659587f3be893860c57e7b338fe3f45284d (diff)
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. 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> (cherry picked from commit 9b353db16d18f87242337e3e61a948c023505a65) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'drivers')
-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 1a377872729d..8b88a8d064af 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 {