* [merged] zram-use-zram_free_page-instead-of-open-coded.patch removed from -mm tree
@ 2017-05-04 19:13 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-05-04 19:13 UTC (permalink / raw)
To: hare, jthumshirn, minchan, mm-commits, sergey.senozhatsky
The patch titled
Subject: zram: use zram_free_page instead of open-coded
has been removed from the -mm tree. Its filename was
zram-use-zram_free_page-instead-of-open-coded.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Minchan Kim <minchan@kernel.org>
Subject: zram: use zram_free_page instead of open-coded
The zram_free_page already handles NULL handle case and same page so use
it to reduce error probability. (Acutaully, I made a mistake when I
handled same page feature)
Link: http://lkml.kernel.org/r/1492052365-16169-7-git-send-email-minchan@kernel.org
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/block/zram/zram_drv.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff -puN drivers/block/zram/zram_drv.c~zram-use-zram_free_page-instead-of-open-coded drivers/block/zram/zram_drv.c
--- a/drivers/block/zram/zram_drv.c~zram-use-zram_free_page-instead-of-open-coded
+++ a/drivers/block/zram/zram_drv.c
@@ -480,17 +480,8 @@ static void zram_meta_free(struct zram *
size_t index;
/* Free all pages that are still in this zram device */
- for (index = 0; index < num_pages; index++) {
- unsigned long handle = zram_get_handle(zram, index);
- /*
- * No memory is allocated for same element filled pages.
- * Simply clear same page flag.
- */
- if (!handle || zram_test_flag(zram, index, ZRAM_SAME))
- continue;
-
- zs_free(zram->mem_pool, handle);
- }
+ for (index = 0; index < num_pages; index++)
+ zram_free_page(zram, index);
zs_destroy_pool(zram->mem_pool);
vfree(zram->table);
@@ -978,9 +969,6 @@ static void zram_reset_device(struct zra
comp = zram->comp;
disksize = zram->disksize;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-05-04 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-04 19:13 [merged] zram-use-zram_free_page-instead-of-open-coded.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.