]> git.baikalelectronics.ru Git - kernel.git/commit
staging: erofs: fix a bug when appling cache strategy
authorGao Xiang <gaoxiang25@huawei.com>
Tue, 18 Sep 2018 14:25:36 +0000 (22:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Sep 2018 14:34:35 +0000 (16:34 +0200)
commitd02fc3cc5a0a82c04a8ab81795074f9ee10f409e
tree3fcf886bf71f79be0ab07c6030b12ddc4165b46d
parent0244c4f1ef545647cf881b0ca7a9681cf1a5425a
staging: erofs: fix a bug when appling cache strategy

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>
drivers/staging/erofs/unzip_vle.c