From 3de693f97e0c023461ba9b04c2965ab277e1e8f5 Mon Sep 17 00:00:00 2001 From: Peter Kalauskas Date: Thu, 8 Nov 2018 11:03:13 -0800 Subject: [PATCH] ANDROID: zram: set comp_len to PAGE_SIZE when page is huge This bug was introduced when two patches were applied out of order. * zram: drop max_zpage_size and use zs_huge_class_size() * zram: mark incompressible page as ZRAM_HUGE Signed-off-by: Peter Kalauskas Bug: 119260394 Change-Id: I437d35c8d23c15237ad9c2d5bd7f99d7bff42872 --- drivers/block/zram/zram_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 7ccc2e3e4ca3..5cc39583ad8d 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -1125,6 +1125,7 @@ compress_again: } if (unlikely(comp_len >= huge_class_size)) { + comp_len = PAGE_SIZE; if (zram_wb_enabled(zram) && allow_wb) { zcomp_stream_put(zram->comp); ret = write_to_bdev(zram, bvec, index, bio, &element); -- 2.20.1