[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y+qVio3p82yuNb5d@li-bb2b2a4c-3307-11b2-a85c-8fa5c3a69313.ibm.com>
Date: Tue, 14 Feb 2023 01:24:50 +0530
From: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
To: Kemeng Shi <shikemeng@...weicloud.com>
Cc: tytso@....edu, adilger.kernel@...ger.ca, jack@...e.cz,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 16/21] ext4: remove unnecessary exit_meta_group_info tag
On Fri, Feb 10, 2023 at 03:48:20AM +0800, Kemeng Shi wrote:
> 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@...weicloud.com>
> ---
> fs/ext4/mballoc.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index c684758d6dbb..289dcd81dd5a 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 @@ int ext4_mb_add_groupinfo(struct super_block *sb, ext4_group_t group,
> group_info[idx] = NULL;
> rcu_read_unlock();
> }
> -exit_meta_group_info:
> return -ENOMEM;
> } /* ext4_mb_add_groupinfo */
>
> --
> 2.30.0
>
Looks good. Feel free to add:
Reviewed-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Powered by blists - more mailing lists