summaryrefslogtreecommitdiff
path: root/fs/ext4/ialloc.c
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2024-08-20 21:22:33 +0800
committerTheodore Ts'o <tytso@mit.edu>2024-09-03 22:12:16 -0400
commit7523a7ef099abe7b9a98c4c8f722fe40541c9723 (patch)
tree7da83b8829214a2a810e589006d24eac08b2af4e /fs/ext4/ialloc.c
parent66eafbde7d74e36cd80e6b6246ea4bd599416e2c (diff)
downloadlinux-7523a7ef099abe7b9a98c4c8f722fe40541c9723.tar.gz
linux-7523a7ef099abe7b9a98c4c8f722fe40541c9723.tar.bz2
linux-7523a7ef099abe7b9a98c4c8f722fe40541c9723.zip
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>
Diffstat (limited to 'fs/ext4/ialloc.c')
-rw-r--r--fs/ext4/ialloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 0234f5e91d8d..daacb9f0ef50 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -772,7 +772,7 @@ int ext4_mark_inode_used(struct super_block *sb, int ino)
}
gdp = ext4_get_group_desc(sb, group, &group_desc_bh);
- if (!gdp || !group_desc_bh) {
+ if (!gdp) {
err = -EINVAL;
goto out;
}