Skip to content

Commit 7d2b488

Browse files
Kemeng Shitytso
authored andcommitted
ext4: check buffer_verified in advance to avoid unneeded ext4_get_group_info()
Check buffer_verified in advance to avoid unneeded ext4_get_group_info(). This could be a simple cleanup as compiler may handle this. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Link: https://patch.msgid.link/20240820132234.2759926-8-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 7523a7e commit 7d2b488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/ext4/ialloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
8787
if (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)
8888
return 0;
8989

90-
grp = ext4_get_group_info(sb, block_group);
91-
9290
if (buffer_verified(bh))
9391
return 0;
92+
93+
grp = ext4_get_group_info(sb, block_group);
9494
if (!grp || EXT4_MB_GRP_IBITMAP_CORRUPT(grp))
9595
return -EFSCORRUPTED;
9696

0 commit comments

Comments
 (0)