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 <peskal@google.com>
Bug: 119260394
Change-Id: I437d35c8d23c15237ad9c2d5bd7f99d7bff42872
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
This commit is contained in:
Peter Kalauskas
2018-11-08 11:03:13 -08:00
committed by Amit Pundir
parent 2734aadd19
commit 41ee54318f

View File

@@ -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);