Message ID | 20230303172120.3800725-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 v21csp307366wrd; Fri, 3 Mar 2023 01:20:51 -0800 (PST) X-Google-Smtp-Source: AK7set9bdBrh5kGFY3zNVIU3GU4f02OgO+KC3Q5Xb7KekeI7TCxtSlXrSKBbeSFxrh29QiCL7SO4 X-Received: by 2002:a17:906:f255:b0:886:fcbf:a1e5 with SMTP id gy21-20020a170906f25500b00886fcbfa1e5mr794353ejb.59.1677835251675; Fri, 03 Mar 2023 01:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677835251; cv=none; d=google.com; s=arc-20160816; b=Y2k64FTFDEzYnL1uaogBHSY3+Xu+m+qPbqWC6JOGkNa8Y8KwcBNRigVsZ8ZBt9wysN kKqvQZLR7ny7e1dVO+0Fa5Iaahf40j2QQNW+SUNj+gmv9d/Wn8jdrHhc2EdCtuh0sMvn cI7eAw3i9w8D2vV0zYzcy3UlMD/VHn8nqqLggFO9iP4YIpnBug/xYaNnw8FHXtMoCU4p GFQwC1yURXswjBAsMIU/Etei3xAKx/CgJdx5TtEgPohIn+Zd9zkVEFTd1J9MfBTdg0wm UJqMqnMgOzCx9kAaBEzVZPqPXAwJicXCFqUG1eR2LKf+WK9tqqrIwptq+J9hnlb9eHwj o/bQ== 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=aHJSuqjZoNXHjR+mkspZpFNILPY0DASUuACNXc623tI=; b=0ftmWt4c4CThgYge6iJGl1eCUP9TSPq1W7nS8lt4jDxMZoGNT1dfMcvz6uSxg6N7mI RLf9oE5d8YXe1UOY38d3biQwLBOtKH9zXanAH9i02cNJ3OxCwh73iNQxbdCI+MCamiSF xQIBoUXMNPJeAT1QwCjT/YQP/Ga2ZxRdRJ1ZmSm9txzHgjSg4T0lynjSOUR6Uyy8ytYJ QKgU6ifkuRKgJGspv2M5LQiJOS5g0gyKINKjZ5EBxBpCjjPCUdXjBydb3dUBNfa+b0dN JcRMcOyDcK90M6tBRb2kAJ4XWheQUydOjN5VbSlOLVESJbc3+E7LAB8oRla+A9Gk6eOW WqGQ== 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 d25-20020a056402079900b004bff4ce5ec3si2184158edy.371.2023.03.03.01.20.28; Fri, 03 Mar 2023 01:20:51 -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 S230229AbjCCJUL (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Fri, 3 Mar 2023 04:20:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229962AbjCCJTx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Mar 2023 04:19:53 -0500 Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBC0734301; Fri, 3 Mar 2023 01:19:51 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4PSj9H1Ldtz4f3mJY; Fri, 3 Mar 2023 17:19:47 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.124.27]) by APP4 (Coremail) with SMTP id gCh0CgDnnbGyuwFkFpqfEg--.45687S5; Fri, 03 Mar 2023 17:19:49 +0800 (CST) From: Kemeng Shi <shikemeng@huaweicloud.com> To: tytso@mit.edu, adilger.kernel@dilger.ca, ojaswin@linux.ibm.com, ritesh.list@gmail.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, shikemeng@huaweicloud.com Subject: [PATCH v3 03/20] ext4: get correct ext4_group_info in ext4_mb_prefetch_fini Date: Sat, 4 Mar 2023 01:21:03 +0800 Message-Id: <20230303172120.3800725-4-shikemeng@huaweicloud.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20230303172120.3800725-1-shikemeng@huaweicloud.com> References: <20230303172120.3800725-1-shikemeng@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgDnnbGyuwFkFpqfEg--.45687S5 X-Coremail-Antispam: 1UD129KBjvJXoW7tFW5Jw1fAr4kGrykCr45KFg_yoW8JFWxpw nxCF1UurW5Wr1DCw40k3y0q3Wxtw1Igry8XryfWw15urWxJrykXFy3KF18AF18JFZa9r1a vw1YvF13Cr1xC3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUBE14x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2jI8I6cxK62vIxIIY0VWUZVW8XwA2048vs2IY02 0E87I2jVAFwI0_JrWl82xGYIkIc2x26xkF7I0E14v26ryj6s0DM28lY4IEw2IIxxk0rwA2 F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_tr0E3s1l84ACjcxK6xIIjx v20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2 z280aVCY1x0267AKxVW0oVCq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0V AKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWUJVWUGwAv7VC2z280aVAFwI0_Jr0_Gr1l Ox8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErc IFxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v2 6r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_JF0_Jw1lIxkGc2 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?1759337776542200876?= X-GMAIL-MSGID: =?utf-8?q?1759337776542200876?= |
Series |
Some bugfix and cleanup to mballoc
|
|
Commit Message
Kemeng Shi
March 3, 2023, 5:21 p.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 6122278e91eb..d1c5b6ea57da 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) &&