mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
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: c5aa903a59
("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>
This commit is contained in:
parent
93368aab0e
commit
d705117ddd
@ -176,7 +176,7 @@ static struct page *erofs_read_inode(struct inode *inode,
|
||||
}
|
||||
|
||||
if (vi->datalayout == EROFS_INODE_CHUNK_BASED) {
|
||||
if (!(vi->chunkformat & EROFS_CHUNK_FORMAT_ALL)) {
|
||||
if (vi->chunkformat & ~EROFS_CHUNK_FORMAT_ALL) {
|
||||
erofs_err(inode->i_sb,
|
||||
"unsupported chunk format %x of nid %llu",
|
||||
vi->chunkformat, vi->nid);
|
||||
|
Loading…
Reference in New Issue
Block a user