Skip to content

Commit d705117

Browse files
committed
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/[email protected] Fixes: c5aa903 ("erofs: support reading chunk-based uncompressed files") Reviewed-by: Liu Bo <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Gao Xiang <[email protected]>
1 parent 93368aa commit d705117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/erofs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static struct page *erofs_read_inode(struct inode *inode,
176176
}
177177

178178
if (vi->datalayout == EROFS_INODE_CHUNK_BASED) {
179-
if (!(vi->chunkformat & EROFS_CHUNK_FORMAT_ALL)) {
179+
if (vi->chunkformat & ~EROFS_CHUNK_FORMAT_ALL) {
180180
erofs_err(inode->i_sb,
181181
"unsupported chunk format %x of nid %llu",
182182
vi->chunkformat, vi->nid);

0 commit comments

Comments
 (0)