Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp5269109rwp; Mon, 17 Jul 2023 00:28:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHp9lY3mfuTca2a4Lyr1WDnZf1nwK2JhqTRbOYaioRy1p1Fvsisbbz7s3j8pjZr3TR/uizF X-Received: by 2002:aa7:d751:0:b0:51f:e92a:62ba with SMTP id a17-20020aa7d751000000b0051fe92a62bamr9704871eds.9.1689578890639; Mon, 17 Jul 2023 00:28:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1689578890; cv=pass; d=google.com; s=arc-20160816; b=eqnuUBx35MlNgbZnRIo/rxA+j/eTPAVcwzvVbwVfTfsD6DOhct5qh9d2HdoIODZFkb icbIHbjkIGNkccVta9ANxMA0oxjbY50kzhDsllso4c2jsm6jGWvibHrspwoXlY+y6Dei uav7AaYcAtVLVIerSe8xOq6I7va+0pjgpKa3UBMdudWO0NyLfSCoVM6jhTiiYNvKMkZG 3HMOEPRdFOE6HcRK8CmyqG+hV8Pfg8FLMjVHdBl03lrr0nOtD31GZJx7IjwerEDX+ciI CbQiUVLGQN03UOBCm9r2kOuKVGckm3CEMtI8YdtRcQ7392etoWAMifVUiHJcjdBNkDTk JgqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=1jx6lFVmKwDxKRTKyth8l44j9L0Zb/QMFJdsJW9zm80=; fh=0GJP+28LkybEKvop4LqEy8BxJfRH275gSD0knS5Obu8=; b=IBbYWc34ZqWQ662bqor7iVhnSJgiOt5NZx1jKv7kquvkOJrF8huocOQzkcAp50TpxX zO93Ix56SIeDgYB9If0kvnKXwik/bnILpqb1GcGNGjZ85LmF3RCS1u6M2/E9EH+Xko2o p6Be3UFcFxsWJdKoWud4xkTmloVJY4d08VxU20KAs7dP/Qoe8lTLV9LKvzXL2MGMNkJh ZUSMZO6E5Agji+blzd06z+Zz7ypQ06z1bMEnQCMgVhQOJdpaCYcLrEd8OxRhu4rd9FTK 6fthw4JGqOei8Te552BVYGjYscpKbGby15NfBRaq8vory94l3peoxb7KnoqKi1rSG9cp Qoxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VPt31VMj; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020aa7c704000000b0051e22dcd390si6876282edq.238.2023.07.17.00.27.46; Mon, 17 Jul 2023 00:28:10 -0700 (PDT) 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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VPt31VMj; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbjGQHUI (ORCPT + 99 others); Mon, 17 Jul 2023 03:20:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229711AbjGQHUF (ORCPT ); Mon, 17 Jul 2023 03:20:05 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2112.outbound.protection.outlook.com [40.107.215.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C99ED1AE for ; Mon, 17 Jul 2023 00:20:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WdEoTVeWaH6dwmw+AerFa39G4p7qJonOa8Uqg0cJcqlqPfrEhl84q0LzsEw0B5126Uj5KtLbgy40/ak5cxaZT3i37hBAoVFDxh87QxAywXCwakfev8ftWMmR7daSQhXTx/G7Mn2d3IZhq/UIxBtzg0mT8CMUeRpoXhM8w9eb7MFAcewN87WyDTZz9xChitRQrrqszOyNuFC7mD/3Ohdkbtq9sLn+kcSIPeTR11VchU8xWchTFTFsjXYPcFHJK8VAWxkK63Vc6YGOFZAlaE23m3CbtRu2b5gTy1ADOLaspa4J0E6fyNVE7QDQzfWJ62eMTe0zPNNVwAMkBIPmDRy7bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1jx6lFVmKwDxKRTKyth8l44j9L0Zb/QMFJdsJW9zm80=; b=b3UB3pXkd6nKXRaR4J/THpgQ2peWm1W5Zn5p6T85kcMNHDkaR0yGLcnrZuxxFrCdiUE9AtqaQufT5BNdGi7OXfFR/sp6PBEZF+WZqLrNPgy/3x54GTDkgZj3el2eS/eNymarD8bv+T2D1RVPOhoUqK1cVanJGXlDYwnVOkUK31xDVfezobcm5z08P3tb/f5ZwKrRNsCgJ1O8Vp4FTF3WIf183br+gFLQce/Jga2UOrOApJmXQOCGxNjlV5IbKn3qJfLsKSo6qpOaceAWQcP7Bc755JLB4LCIKRd2SVCFvJ/IFDKxkdGXdaFdouleFAd8m7n2NFkLnjAifyP8lHLUEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1jx6lFVmKwDxKRTKyth8l44j9L0Zb/QMFJdsJW9zm80=; b=VPt31VMjoYbhixYBFcKd18EbSz6KnBno9s6MvSTG++n7TxPbZuF0/Pe+YfB5aJRFmAGOEg7jH4thRr3iFSPZvs7kMA5M8DaB6f5np3HTBsTxMvW0SvoVsjA3V2yPBJjqKhMip+TwEge+9aNb4sKWIckW/ToNOr2ZqWLX4UXzxRuSYw/z4Ly6MdHJvQK0MIQfE92115ZUx7xW3LyIm2WSBtKkNdoRbDv8JmiR390psEa+iaNZwYXl0IGrlKOE34o8LrUpCuGzPfrgOccWjioDa/HGDfbH49WoGdnBU168m6IUSPfenYTzCiJZRjSSyRI3OVgUdN7eFCQvCCE9QEOvGA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) by SI2PR06MB3993.apcprd06.prod.outlook.com (2603:1096:4:e9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.31; Mon, 17 Jul 2023 07:19:58 +0000 Received: from SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a]) by SG2PR06MB5288.apcprd06.prod.outlook.com ([fe80::f9b8:80b5:844e:f49a%6]) with mapi id 15.20.6565.037; Mon, 17 Jul 2023 07:19:58 +0000 From: Minjie Du To: Bob Peterson , Andreas Gruenbacher , cluster-devel@redhat.com (open list:GFS2 FILE SYSTEM), linux-kernel@vger.kernel.org (open list) Cc: opensource.kernel@vivo.com, Minjie Du Subject: [PATCH v1] gfs2: increase usage of folio_next_index() helper Date: Mon, 17 Jul 2023 15:19:37 +0800 Message-Id: <20230717071938.6204-1-duminjie@vivo.com> X-Mailer: git-send-email 2.39.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2P153CA0001.APCP153.PROD.OUTLOOK.COM (2603:1096::11) To SG2PR06MB5288.apcprd06.prod.outlook.com (2603:1096:4:1dc::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PR06MB5288:EE_|SI2PR06MB3993:EE_ X-MS-Office365-Filtering-Correlation-Id: dc89f440-6756-4d58-e63a-08db86963a2f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2LHiSsD66HVwzXT++M9h2VhtnGtyE1gUq2xMIlaiPLRLVYLFBF79mjxME3BbJBC0+ZM9hSrO9VYElY5t0hJmaTfc81tEf2Oige3M3kQLdfa8uzM6Yg9FmGNz0YGpvoRE0obkiQZh+0p6iHQ6DGUWRp2p0LsPYX3t28YaILiyXVQm/uzEXCyZyrp4YdpQxAJFrreZnHNHKtbV/7r7hDkP1zVICN5V9vzpVMmrfe3+Odh1sg0VHwF0+y1Ei2dDYOjxos45nK08bZYfbaPA/SMeO/Wo5d55WObAQjeDg70DEZrYlJt/7sJBHYWsO41GqIglXwNTlgqrvu+qff2ikijXgiWvxORT5fRL1qeKULoBF7WdQw8/QNXwlYVTB633etAc11O/dyoFQYO+NakvKWKjDne6emAOCgSPhZC+srgLysY0kKUXgyTRRFVB34ijnSelioIObYmyVukXaOplhnDUYxsxwQhVAvWAZyDWHaaj2ZOrX/JYx9+Vgvi6d9wmVedZ0qMIBK6+IS42E4D5tsJQkXr/9F875s5i4aWjuggMiJfvOhQ1OE9roQElpTNzVnoig9kS6lRz0UDj15KpYQV9ihRLxyGmOyc20utudvuKVQnLTQyTWM2yLV8PptCcs1Fu X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB5288.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(136003)(39860400002)(376002)(396003)(451199021)(478600001)(66556008)(66476007)(66946007)(5660300002)(4326008)(316002)(8676002)(8936002)(2906002)(41300700001)(4744005)(6666004)(110136005)(6512007)(26005)(1076003)(6506007)(6486002)(52116002)(107886003)(38100700002)(186003)(2616005)(83380400001)(36756003)(38350700002)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PoocIdjb2Oy3Byr81MxWnszKd2rjHxYh/ZSWiN9MN4gF8kO4zHWXhWfv+BTE?= =?us-ascii?Q?OOaaJZaJeAJEjDlp2WvGYLITEmWdcPIGgOv3J+L9OleTtLAQofmJ7zz6kMZJ?= =?us-ascii?Q?qHluAbmjt9A88YYMi/Gxi9hF2LvPi+r2mMRijGIeIiQFipjexyVHK+9Y9v76?= =?us-ascii?Q?G/75FKtaPVkInC0dVQSPD7+OofZ27QQH3uIgHj8u5QZl0W2p0Ir7rlexZPlQ?= =?us-ascii?Q?Z3W9tnLflablnXiX/Kz/YlLdq3N1oB9GaMD6Cf30rtQlfJ5Ha/mX9Tkqefz9?= =?us-ascii?Q?1uz3WeeLKwJsTw9PzyRlOSngEM2dBSq7TgB4eyFKwQLdycZzG69Sk8b4/1CJ?= =?us-ascii?Q?gxVf4TKE3TizfhwV1lMBJH5wjYnucpJ+9tRsQfWbT5U4p+mo9cncvp4SD7pE?= =?us-ascii?Q?uIt6YDc/G9dxY7Kmgm3Ip3A8Q2Armwzs+JJHkgcC7NOjYxGAV9iuZ+6GY71d?= =?us-ascii?Q?diUS/K1oWE0vYvrAC55EWJxLiLtkXWRNmm5Lme8ynIXtT5o0e9RGRLlwB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QB+49Rgxc3llfpt7VWy2ckkFUF/2Sw81nh?= =?us-ascii?Q?9V62/zey+yLjbr85aGhgG5deoorkq2PAxU4e9fg5ZxRwZJJpchBakQXgqZWS?= =?us-ascii?Q?JOiYFF7b6wTNShxFZghgiOGe/FtQmvJRCij1HkBO0Iw6oJcJHvXvu/NTn1St?= =?us-ascii?Q?E6cbh5h2KwkIQrkJwyYvZx06OhlBUJhq8WzDH7nh?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc89f440-6756-4d58-e63a-08db86963a2f X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB5288.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2023 07:19:58.5160 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pfl3IIT2RnUVaDZL/gfIZvW1XHLJPB0B6IjUADWQI6ZMloIC1Hcx/33/0UIVKd2ai34lx9JNCvTiODEHXipN0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB3993 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using the existing helper folio_next_index(). Signed-off-by: Minjie Du --- fs/gfs2/aops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index ae49256b7..5f0254237 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -272,8 +272,7 @@ static int gfs2_write_jdata_batch(struct address_space *mapping, * not be suitable for data integrity * writeout). */ - *done_index = folio->index + - folio_nr_pages(folio); + *done_index = folio_next_index(folio); ret = 1; break; } -- 2.39.0