Message ID | 20230209194825.511043-17-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp291001wrn; Thu, 9 Feb 2023 04:01:40 -0800 (PST) X-Google-Smtp-Source: AK7set9/T42unHc19uhsQGVtRsyEwXWxRDd5CPqVdH2K5ThifpamPNKD9BkgPD+aiVPxX2gzFsSa X-Received: by 2002:a05:6a20:c191:b0:bc:6ffd:c064 with SMTP id bg17-20020a056a20c19100b000bc6ffdc064mr11524229pzb.25.1675944100504; Thu, 09 Feb 2023 04:01:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675944100; cv=none; d=google.com; s=arc-20160816; b=rd0Ksk5llaHDUhQtFFI1NndnsEinhPdLqwSzlMuRHRXN7uG6Q3cLkz4hAK+egizGuj +Tk4cGy+uPRCxjv+xjXC13+2VXfby6XBnJWKKFvfx12JIggSegmvpQpRKLmsgupLBmFH WSj69YKT7TMYX3A2q6cpvOdTfgACLVXV2f1lVynXMoM4HybIpG2WGUcyyFTHmHFQ/0VJ MErNyZPdsKVH5sUw9bWQ6G0JON8pqg6aHhUyrfrH/WwgRMsZYsTelSzcE4kmCPDnZLxq aKwX7AvXiT8xrk3BpOrGB7LW+3k6hHVAqu9wsP6t5g4kOr7qzJL26KyhDD9zTInJGbY9 9+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TuRkHB9i/I6xK4A/Q3V9DrZO9YKcHo3t+KuJS5VEqTI=; b=vH8bWgK3B3JSYwzy6njBTccxwp0sG1eTwPYRgXuJ7W1AGTJWwPWYDMcVHv5jCdL5gV 8eKLR7XqUZlOkd8h+N1mtJvyTxhHantxKIrbbgiwSp1oT62fK0qkF0zTcEp8uDPIHlMt h03d7dqYWBATUix6GLWHcwzZqZYTrYnwtiWUksPKP5sPdgYi5q74ctXBtGMjPRzyVy4U TvT0erGVAYpL2l9lMF0IJxh5yImpxEFI7QwLNWHJrIAaGzxo52az75diPHtZXobbm3um pkCtOhAmafRK2wVDrQHQT3tE46elkT8E2SzISL6GxwFahMQLfHwRVkejJbtiuOZwJnqp Vuuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j3-20020a63b603000000b004fb3ebf19fesi1748195pgf.798.2023.02.09.04.01.21; Thu, 09 Feb 2023 04:01:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230480AbjBIL6E (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Thu, 9 Feb 2023 06:58:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjBIL4Q (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 9 Feb 2023 06:56:16 -0500 Received: from dggsgout11.his.huawei.com (dggsgout11.his.huawei.com [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64AA55C49F; Thu, 9 Feb 2023 03:46:33 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.169]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4PCFSh47Pmz4f3k5r; Thu, 9 Feb 2023 19:46:28 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgAn3rEQ3eRjgb0tDQ--.53508S18; Thu, 09 Feb 2023 19:46:30 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 16/21] ext4: remove unnecessary exit_meta_group_info tag Date: Fri, 10 Feb 2023 03:48:20 +0800 Message-Id: <20230209194825.511043-17-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230209194825.511043-1-shikemeng@huaweicloud.com> References: <20230209194825.511043-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgAn3rEQ3eRjgb0tDQ--.53508S18 X-Coremail-Antispam: 1UD129KBjvdXoW7XFW5WrWrXF15KrWfJw4DXFb_yoWDXrc_Aa y7JFW8WrW8Jr1fKa1Ig393tr48tF4rAr1kXF4ft3y3ZF1UWrs5u3WkArnxArZruay7JFyU tr93JryxGa1IqjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbSxYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l87I20VAvwVAaII0Ic2I_JFv_Gryl82 xGYIkIc2x26280x7IE14v26r126s0DM28IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC 64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM2 8EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq 3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8w Aqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE 14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCF04k20xvY0x 0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E 7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcV C0I7IYx2IY67AKxVW8JVW5JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Cr0_Gr1UMIIF0xvE 42xK8VAvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6x kF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUIL05UUUUU X-CM-SenderInfo: 5vklyvpphqwq5kxd4v5lfo033gof0z/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757354761167538002?= X-GMAIL-MSGID: =?utf-8?q?1757354761167538002?= |
Series |
Some bugfix and cleanup to mballoc
|
|
Commit Message
Kemeng Shi
Feb. 9, 2023, 7:48 p.m. UTC
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>
---
fs/ext4/mballoc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
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@huaweicloud.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@linux.ibm.com>
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 */