summaryrefslogtreecommitdiffstats
path: root/fs/ext4/mballoc.c
diff options
context:
space:
mode:
authorKemeng Shi <shikemeng@huaweicloud.com>2023-03-04 01:21:15 +0800
committerTheodore Ts'o <tytso@mit.edu>2023-04-06 01:13:11 -0400
commitdf11909514c5243a62fcd5e122f40f19f3a7076c (patch)
tree9ab7ec10a6d163cd9631f35a9c46bab3d86ada8e /fs/ext4/mballoc.c
parent78dc9f844f4ec999a30517313040948a4c4bbc00 (diff)
downloadlinux-stable-df11909514c5243a62fcd5e122f40f19f3a7076c.tar.gz
linux-stable-df11909514c5243a62fcd5e122f40f19f3a7076c.tar.bz2
linux-stable-df11909514c5243a62fcd5e122f40f19f3a7076c.zip
ext4: remove unnecessary exit_meta_group_info tag
We goto exit_meta_group_info only to return -ENOMEM. Return -ENOMEM directly instead of goto to remove this unnecessary tag. Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Link: https://lore.kernel.org/r/20230303172120.3800725-16-shikemeng@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/mballoc.c')
-rw-r--r--fs/ext4/mballoc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index a12c33bc2756..4364343bbcef 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3069,7 +3069,7 @@ int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
if (meta_group_info == NULL) {
ext4_msg(sb, KERN_ERR, "can't allocate mem "
"for a buddy group");
- goto exit_meta_group_info;
+ return -ENOMEM;
}
rcu_read_lock();
rcu_dereference(sbi->s_group_info)[idx] = meta_group_info;
@@ -3123,7 +3123,6 @@ exit_group_info:
group_info[idx] = NULL;
rcu_read_unlock();
}
-exit_meta_group_info:
return -ENOMEM;
} /* ext4_mb_add_groupinfo */