summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2014-01-30 15:46:01 -0800
committerChanho Park <chanho61.park@samsung.com>2014-03-20 17:44:36 +0900
commit4ec34f5c6eebc1b33e465b34a13636cd4402e13c (patch)
treedca1dd32e6d92502bb28a5559e1861c2ca5019c1 /drivers
parent7844862c3be3cf98e9d8d89dac58156110ab93b4 (diff)
downloadlinux-3.10-4ec34f5c6eebc1b33e465b34a13636cd4402e13c.tar.gz
linux-3.10-4ec34f5c6eebc1b33e465b34a13636cd4402e13c.tar.bz2
linux-3.10-4ec34f5c6eebc1b33e465b34a13636cd4402e13c.zip
zram: remove unnecessary free
Commit a0c516cbfc74 ("zram: don't grab mutex in zram_slot_free_noity") introduced pending zram slot free in zram's write path in case of missing slot free by memory allocation failure in zram_slot_free_notify but it is not necessary because we have already freed the slot right before overwriting. Change-Id: I5048bce2ca8c377d9539f0397a04bddc5f5a5e92 Signed-off-by: Minchan Kim <minchan@kernel.org> Cc: Nitin Gupta <ngupta@vflare.org> Cc: Jerome Marchand <jmarchan@redhat.com> Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/zram/zram_drv.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 34c1a229074..dee1b95fad9 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -440,14 +440,6 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index,
goto out;
}
- /*
- * zram_slot_free_notify could miss free so that let's
- * double check.
- */
- if (unlikely(meta->table[index].handle ||
- zram_test_flag(meta, index, ZRAM_ZERO)))
- zram_free_page(zram, index);
-
ret = lzo1x_1_compress(uncmem, PAGE_SIZE, src, &clen,
meta->compress_workmem);