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 <kilobyte@angband.pl> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Link: https://lore.kernel.org/r/20211115172020.57853-1-kilobyte@angband.pl Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent fac888b commit 037e7c5

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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)