summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2018-09-18 22:25:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-02-27 10:09:01 +0100
commit1c9d5a47c681837ca20a39325f033d98c27277e3 (patch)
tree44b9a9caeba7a8d04d89258b3f723df459e78de9
parentc375152be9dd9d6fbf6ae5ac8be337d0590f192a (diff)
downloadlinux-1c9d5a47c681837ca20a39325f033d98c27277e3.tar.gz
linux-1c9d5a47c681837ca20a39325f033d98c27277e3.tar.bz2
linux-1c9d5a47c681837ca20a39325f033d98c27277e3.zip
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 <yuchao0@huawei.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/erofs/unzip_vle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs/unzip_vle.c
index 0346630b67c8..35ae0865c1fd 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;