Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 109a48ed authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

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: default avatarPeter Kalauskas <peskal@google.com>
Bug: 119260394
Change-Id: I8601db640e41813b47a25d14514e53050ae8128e
parent ba62b301
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1125,6 +1125,7 @@ static int __zram_bvec_write(struct zram *zram, struct bio_vec *bvec,
	}

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