Skip to content

Commit 037e7c5

Browse files
kilobytetytso
authored andcommitted
ext4: drop an always true check
EXT_FIRST_INDEX(ptr) is ptr+12, which can't possibly be null; gcc-12 warns about this. Signed-off-by: Adam Borowski <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent fac888b commit 037e7c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/ext4/extents.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,8 +1496,7 @@ static int ext4_ext_search_left(struct inode *inode,
14961496
EXT4_ERROR_INODE(inode,
14971497
"ix (%d) != EXT_FIRST_INDEX (%d) (depth %d)!",
14981498
ix != NULL ? le32_to_cpu(ix->ei_block) : 0,
1499-
EXT_FIRST_INDEX(path[depth].p_hdr) != NULL ?
1500-
le32_to_cpu(EXT_FIRST_INDEX(path[depth].p_hdr)->ei_block) : 0,
1499+
le32_to_cpu(EXT_FIRST_INDEX(path[depth].p_hdr)->ei_block),
15011500
depth);
15021501
return -EFSCORRUPTED;
15031502
}

0 commit comments

Comments
 (0)