From: Gao Xiang Date: Tue, 18 Sep 2018 14:25:36 +0000 (+0800) Subject: staging: erofs: fix a bug when appling cache strategy X-Git-Tag: v4.19.26~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c9d5a47c681837ca20a39325f033d98c27277e3;p=platform%2Fkernel%2Flinux-rpi.git staging: erofs: fix a bug when appling cache strategy commit 0734ffbf574ee813b20899caef2fe0ed502bb783 upstream. As described in Kconfig, the last compressed pack should be cached for further reading for either `EROFS_FS_ZIP_CACHE_UNIPOLAR' or `EROFS_FS_ZIP_CACHE_BIPOLAR' by design. However, there is a bug in z_erofs_do_read_page, it will switch `initial' to `false' at the very beginning before it decides to cache the last compressed pack. caching strategy should work properly after appling this patch. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c index 0346630..35ae086 100644 --- a/drivers/staging/erofs/unzip_vle.c +++ b/drivers/staging/erofs/unzip_vle.c @@ -624,7 +624,7 @@ repeat: /* go ahead the next map_blocks */ debugln("%s: [out-of-range] pos %llu", __func__, offset + cur); - if (!z_erofs_vle_work_iter_end(builder)) + if (z_erofs_vle_work_iter_end(builder)) fe->initial = false; map->m_la = offset + cur;