]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: fix misbehavior of unsupported chunk format check
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 22 Sep 2021 09:51:41 +0000 (17:51 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 23 Sep 2021 15:22:04 +0000 (23:22 +0800)
commit740a93dd455f6b124a366c753c93558ece08a5de
tree1b4774a9c081bbc7504d3d3dc94fba5ae1350c1c
parent365406e40e92d10f5aa2409e107cd91f47c19933
erofs: fix misbehavior of unsupported chunk format check

Unsupported chunk format should be checked with
"if (vi->chunkformat & ~EROFS_CHUNK_FORMAT_ALL)"

Found when checking with 4k-byte blockmap (although currently mkfs
uses inode chunk indexes format by default.)

Link: https://lore.kernel.org/r/20210922095141.233938-1-hsiangkao@linux.alibaba.com
Fixes: 3187d4452d26 ("erofs: support reading chunk-based uncompressed files")
Reviewed-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/inode.c