浏览代码

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>
Gao Xiang 6 年之前
父节点
当前提交
0734ffbf57
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/erofs/unzip_vle.c

+ 1 - 1
drivers/staging/erofs/unzip_vle.c

@@ -629,7 +629,7 @@ repeat:
 	/* go ahead the next map_blocks */
 	/* go ahead the next map_blocks */
 	debugln("%s: [out-of-range] pos %llu", __func__, offset + cur);
 	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;
 		fe->initial = false;
 
 
 	map->m_la = offset + cur;
 	map->m_la = offset + cur;