mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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>
This commit is contained in:
parent
7523a7ef09
commit
7d2b488818
@ -87,10 +87,10 @@ static int ext4_validate_inode_bitmap(struct super_block *sb,
|
||||
if (EXT4_SB(sb)->s_mount_state & EXT4_FC_REPLAY)
|
||||
return 0;
|
||||
|
||||
grp = ext4_get_group_info(sb, block_group);
|
||||
|
||||
if (buffer_verified(bh))
|
||||
return 0;
|
||||
|
||||
grp = ext4_get_group_info(sb, block_group);
|
||||
if (!grp || EXT4_MB_GRP_IBITMAP_CORRUPT(grp))
|
||||
return -EFSCORRUPTED;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user