Skip to content

Commit 7523a7e

Browse files
Kemeng Shitytso
authored andcommitted
ext4: remove unneeded NULL check of buffer_head in ext4_mark_inode_used()
If gdp from ext4_get_group_desc() is not NULL, then returned group_desc_bh won't be NULL either. Remove check of group_desc_bh and only check returned gdp from ext4_get_group_desc() like how other callers do. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Link: https://patch.msgid.link/20240820132234.2759926-7-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 66eafbd commit 7523a7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext4/ialloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ int ext4_mark_inode_used(struct super_block *sb, int ino)
772772
}
773773

774774
gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
775-
if (!gdp || !group_desc_bh) {
775+
if (!gdp) {
776776
err = -EINVAL;
777777
goto out;
778778
}

0 commit comments

Comments
 (0)