Message ID | 20230228114306.3328235-4-shikemeng@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2791363wrd; Mon, 27 Feb 2023 19:43:16 -0800 (PST) X-Google-Smtp-Source: AK7set9ldX7iNZXg/K69NES9vQap2L5LS05dLxSeu4EWWRUHxurVEIXfBCBjR5xSTd30fN0LSs1P X-Received: by 2002:aa7:cb99:0:b0:4ab:178d:3d9f with SMTP id r25-20020aa7cb99000000b004ab178d3d9fmr1690537edt.28.1677555796832; Mon, 27 Feb 2023 19:43:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677555796; cv=none; d=google.com; s=arc-20160816; b=t9Fc9ur7pzHsB4NIoFObLe9SgE5187yk397N1pH0mU1tsXSzcQopiod0EpfJH0ZxQF ckJ7TG5ia2LUhBNx02gKqbpBHR5Zo6iK4nTEf2Bzx+uCFsbpSB5A/X+dWRTkvQgmu6Ts WR4UCw5d8HRdARioA0p6Aqc/mSsFYPWBk2PP4f+pjNzUwIq3sXqEzJPNAMKAXAOM+SIY M6ZrvFMl1KYshC33xtK4oIpjY9ergZcmG9dn8d/sPE22L84h4qbXJk00rS0TlGjDO60F VVTfwV24S4ReGBCF/GOHf8hZjEek0mZ0BeBc7qXOBuC+NG31MfHoXIloWjO1cgatSoOD mbGQ== 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=80vkDvXxFQXbjrc0JAIC7Gxuo7/MktSV/NVV/jzDgpE=; b=JF7HOaY4jmRm7fbH1ySKEirZyAwZ/A8zTnWhuKpMg1XC9FVS4l0QUL2d3nE3mBYSIi PIBli+5LIqnmqmTmLEhNt+8rv9XvyGPipB23mJRytIXsIOrZGdzdii5fedwvBeMpC/Eu OXU102k29D1kad9cIUqv/jMwTau6swvCzPX/NXv41x3389hL5Qm14niJbXokCUxSpIk3 E8neu03x6yakB6F5fCCxiZysPD7IW+ezWUXO0XO6IHfhuo05qaBkjibtjM6uxHIW0d1F l4Krj1Rpk4Nt1ozxt1KzcLzEJftbeefbrP/3ifDWBkzq+nYmusWrJwMeZPPqDuuD8GrG AY3A== 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 v23-20020aa7d817000000b004af6a174397si11038189edq.231.2023.02.27.19.42.54; Mon, 27 Feb 2023 19:43:16 -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 S229470AbjB1Dl7 (ORCPT <rfc822;liqunnana@gmail.com> + 99 others); Mon, 27 Feb 2023 22:41:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229821AbjB1Dlh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Feb 2023 22:41:37 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED69524497; Mon, 27 Feb 2023 19:41:33 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PQjpK230mz4f3lc7; Tue, 28 Feb 2023 11:41:29 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP2 (Coremail) with SMTP id Syh0CgDnjOrod_1jpDeZEQ--.58449S5; Tue, 28 Feb 2023 11:41:31 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, ojaswin@linux.ibm.com, ritesh.list@gmail.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v2 03/20] ext4: get correct ext4_group_info in ext4_mb_prefetch_fini Date: Tue, 28 Feb 2023 19:42:49 +0800 Message-Id: <20230228114306.3328235-4-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230228114306.3328235-1-shikemeng@huaweicloud.com> References: <20230228114306.3328235-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: Syh0CgDnjOrod_1jpDeZEQ--.58449S5 X-Coremail-Antispam: 1UD129KBjvJXoW7tFW5Jw1fAr4kGrykCr45KFg_yoW8JFWxp3 ZxCF1Uur4rWr1DCr40k3y0q3WxKw1Igry8XryfWw1UurWxJrykXF13KF18AF18JFZa9r13 Zw1YvF13Cr12k3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBE14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JrWl82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2 z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v2 6r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2 Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_ Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMI IF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0pRPEf5UUUUU = 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?1759044747130642682?= X-GMAIL-MSGID: =?utf-8?q?1759044747130642682?= |
Series |
Some bugfix and cleanup to mballoc
|
|
Commit Message
Kemeng Shi
Feb. 28, 2023, 11:42 a.m. UTC
We always get ext4_group_desc with group + 1 and ext4_group_info with group to check if we need do initialize ext4_group_info for the group. Just get ext4_group_desc with group for ext4_group_info initialization check. Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com> Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com> --- fs/ext4/mballoc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 375d9655b525..b94c9f331a3c 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -2569,14 +2569,14 @@ ext4_group_t ext4_mb_prefetch(struct super_block *sb, ext4_group_t group, void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group, unsigned int nr) { - while (nr-- > 0) { - struct ext4_group_desc *gdp = ext4_get_group_desc(sb, group, - NULL); - struct ext4_group_info *grp = ext4_get_group_info(sb, group); + struct ext4_group_desc *gdp; + struct ext4_group_info *grp; + while (nr-- > 0) { if (!group) group = ext4_get_groups_count(sb); group--; + gdp = ext4_get_group_desc(sb, group, NULL); grp = ext4_get_group_info(sb, group); if (EXT4_MB_GRP_NEED_INIT(grp) &&