diff options
author | Minchan Kim <minchan@kernel.org> | 2014-01-30 18:46:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-30 19:56:55 -0500 |
commit | 874e3cddc33f0c0f9cc08ad2b73fa0cbe7dfaa63 (patch) | |
tree | fe3e17b75de97c458a254fc6fc1df16587ea71ae /drivers/block | |
parent | 9b353db16d18f87242337e3e61a948c023505a65 (diff) |
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.
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/block')
-rw-r--r-- | drivers/block/zram/zram_drv.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index d87c7e98fb11..ebfddd852272 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c | |||
@@ -441,14 +441,6 @@ static int zram_bvec_write(struct zram *zram, struct bio_vec *bvec, u32 index, | |||
441 | goto out; | 441 | goto out; |
442 | } | 442 | } |
443 | 443 | ||
444 | /* | ||
445 | * zram_slot_free_notify could miss free so that let's | ||
446 | * double check. | ||
447 | */ | ||
448 | if (unlikely(meta->table[index].handle || | ||
449 | zram_test_flag(meta, index, ZRAM_ZERO))) | ||
450 | zram_free_page(zram, index); | ||
451 | |||
452 | ret = lzo1x_1_compress(uncmem, PAGE_SIZE, src, &clen, | 444 | ret = lzo1x_1_compress(uncmem, PAGE_SIZE, src, &clen, |
453 | meta->compress_workmem); | 445 | meta->compress_workmem); |
454 | 446 | ||