From patchwork Thu Mar 9 15:21:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 66937 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp352421wrd; Thu, 9 Mar 2023 07:27:11 -0800 (PST) X-Google-Smtp-Source: AK7set/rgglvpY2MaS82WnhC0apx91Us5lHlXmBGw05BWLX0Flid6CK27fXKWp/0ppWKoP7Bqdnc X-Received: by 2002:a05:6a21:33a2:b0:cc:606a:4349 with SMTP id yy34-20020a056a2133a200b000cc606a4349mr26521133pzb.8.1678375631145; Thu, 09 Mar 2023 07:27:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678375631; cv=pass; d=google.com; s=arc-20160816; b=Rpii3QEPbfij0IYMZu8q1sv9W/0JOHYjFCE0ixbtJfDhEFVwiL6qEu7uZVNzcy7Fby 1FaF3/LkJ5LBgZrtmWNHvWJsrJbC6VEX7lZVtHTXuJ0PMr3M7Xo1KH4+c/mZJnFL3/31 LrmtTYMAmjEypcPPLAVBXuZp7qPtE+5Zee0kJWSLbki636ZAWrtDhDkwin9lJ+XZnpWx jt5JEcIGSa9Kl/db1uG3ei4VG0WzfhnhA01H9Aw9rSxhe7GZ2Br0baMSATZazLKlWpr+ srXv8buUXRcFh2dcfJMCeZ2Q4P8OXquiOpfdgdm9q3KT1MkNA/065jnKvYAzorHvRPE0 x3mA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EN5Y7OXDT4V2bpXioGREHUJ3PuMN8TbPuqNvpGP3jcc=; b=LCwjQDfACT6T+m0+mOcB4ziYjIoQaW4o6TT5KGsB7HGGrTr+KCimiGnnIGLxsHvK+s VMGpETlLQxEkTG4Jf5s1bl0/YLCksQRFAIrzchICyzDuEEOCH1e/+ylYCwQ9iJbU3buW sJBLww49jlH7GOOBL0BLARDy0+7OGjZxZL03igdVX0N29SQwphbU8+Zc231AgC1ZjJvP UNk3M7T8lmZlRH7Ye1Z7lDzhsS+5choRK6hmTa3DzHrw5QwvS50Cm1pW3TZ339S2nGpC +GXNSBkZbZE4R1EUZ9dBZiMJt5JNpc3XR0lbGoLk2RdiWDlzzf6fAC77Dc2UifdW5281 ysMA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WLWfPvQU; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a65498c000000b0049e0bab8d55si17032532pgs.133.2023.03.09.07.26.54; Thu, 09 Mar 2023 07:27:11 -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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WLWfPvQU; 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 S231469AbjCIPW1 (ORCPT + 99 others); Thu, 9 Mar 2023 10:22:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231311AbjCIPWU (ORCPT ); Thu, 9 Mar 2023 10:22:20 -0500 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2109.outbound.protection.outlook.com [40.107.255.109]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E50CF05C4; Thu, 9 Mar 2023 07:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WBAJWSn5iYdhpB+5xdqRyRLOd9k9qit8bZNsJiO34oQzQKdqH6Sr/AK34teHp29ItFqfxQpz632Kas3bQ0Z+oypeGanG5TUJYjxHCKrUqMbPTMFqPhgrOGlrB0g1946RYaDCOAn1pWav7/hOLP28XpEBoOBwmxH7AHKilIQj8XuiP+QrYOhwYczO4UkP8dELyA2FwC+PZXZAIHdIsMHfiUc44yUePcmvPdmBvmHL7cv7VCVWKNVob3FyHGqF4N98fwLDO4mywbYu/D+ymiNLNu5TZVwE8/qFT1OjUFteNKnYpHLhyEHzKhRVV7wmoS+tZKXJf588Irtiy8tnnoeauw== 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=EN5Y7OXDT4V2bpXioGREHUJ3PuMN8TbPuqNvpGP3jcc=; b=XPIwo5mwdrs4NQ6yL9qYHMXUnuP8ONYTt96v62AP1lJUkaZfmQ+zObVYlskFxWc50iSLLMQh7qoT2ZfIFvGwdojaREdXVB4JL3GNO0Tu07+gSF4mT+/SUcPGlk37o1uh1nuFkphO0tmVohaeuzIQDI0oTmaJuvyBPMrJrYJZVUWmBDDZEGChmNFnE9BguhP48lj2IrCKYEpZVaCgpBpvF0R8Ze+upryUND7hXlJkLv6sNUKQeDBgi+BkoLsPUOuC9U+8ZYQchgT+s16x9w9m8AgYtOExobvPAYEpJiQae5E2c10aOhNcPoU06uSB3svs6vbFy+Dwi2RPaIsGq0mcoQ== 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=EN5Y7OXDT4V2bpXioGREHUJ3PuMN8TbPuqNvpGP3jcc=; b=WLWfPvQU2bhObgm6GxjC+aS9Q596I2BOM2k9fq6Uv86oCb3vOWSmp7XDdyV6fWh5v2LFcEkw3ji4sdyirJA1LbYeruxuYvPZSLR9TL3SNKOmzMkI+tlVO5UtraaJzIvkNi4jzzuRRa5Dq44JGll2I6f2oj8lKC/qU7ODpnI9WI8KZBI/wUVQMG2fleksKeuXo8hu5WgSETOgEi+NJjYTVKWJEfyLVWJnG1xIMoYks6ae1zcc+rCVnsqqjRLzN/Xs83TPsjJkrCwaVtTXbdO+IPb1fNXEyIqe4mDvqTtYaWx/o+1E7RMlEFVrV+c3HxWvt7mPSVTzwV4e53q7ouDgPg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB4073.apcprd06.prod.outlook.com (2603:1096:4:f5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Thu, 9 Mar 2023 15:22:13 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869%9]) with mapi id 15.20.6178.019; Thu, 9 Mar 2023 15:22:13 +0000 From: Yangtao Li To: xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com, tytso@mit.edu, adilger.kernel@dilger.ca, rpeterso@redhat.com, agruenba@redhat.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, viro@zeniv.linux.org.uk, brauner@kernel.org Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH v3 3/6] gfs2: convert to use i_blockmask() Date: Thu, 9 Mar 2023 23:21:24 +0800 Message-Id: <20230309152127.41427-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a9c6312-19bb-4ca1-342f-08db20b20ee5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9zw4iYeFkgTHMTIZeNkJQD6Ts/vtKZyF060qehqrCBZt1Gok3wu/rHoVurBt9d3xFwtq6mygGzq0NZN8BemSVoOgfcujo+OY07p+6TXy0W+DdnrM6Vnym2YcXhYv51U2/9IXugNs/hZCV7piJbF02H6POkCBsVokTW4Js473fKVpNlZH5hhLIDPZ7wAHoNWRGrg95yTu61qbzMlKA6JPXzpOP/zp136bq4M/LpUhMqDMUauavqgS+rmAVxGSUUmr77X3q0JvSOsbUU0Luba74tDMa+O115DjgP2QRXo+2mrQP8Jqq5LDJ6unI/ZIfnOO+QeI2uxIm6uob9icCqtn6A1J1cXsZyzFvHTkowEne1JPTCTUpWx3iJ7duBkS2Tr7bUl0z87E8+khMM7O+vZdVUulh1W2zLoBi7m47ZH4sUBOiVGiR2+2z6AO4afxqhJtbsNht6Td/WtKUjhJZAnP0UAWvzvTxGnXEjZcyVJy4PdW5zPmJzx9Yv3icjm4Rooo9vUVfBceHMR/Y7Gks2NBlsGeNLZhkqJfUIa7e9ihw35/3mtPZgyHideRhddlxEqqG2vhemQFMoDhdJwjvfLAZgun1yFyhoEE8r01CKoFlxoTWkYZEDzm6sfy3ZYXTXaR3TU3sZSYkfmjnnf80QMN4wWTIz37hF9pq/FVjScK6qTOnqGeFH/O3w9EKVIno4hDpIITGKinL/M1G8CGPe4XtuvAF/qmJP6i7WHMCso83BI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(6666004)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FdlOoEXvsQSiXX57b9tinHs6OggfuNN8FYqn7UcnWWb9ANcQEYafcJ6eeYtIuihc0DCNa4zgy+cs6MvaY4UjfNE+gADkXhHYoy7z/QK6WyGwLJqWOE3E0Mlfd/BKNy7+Y5FRanoktcqLoXnvz1o0Lne+bP8q0NIAXv0tV+2faEwW4vLXbw+ncfNFClaDIz3NV/YQpobm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MGqOhh53lhm/hq80AxBkcbe4UkovLmsNCi8g9JR29vi9he1cu3Cx42TZBqrnNLBabxl21uxaxhmHiVyiGaAkD8lGwZi5/r5n+4HvtTieX+jQeBHNcySZuap9NNtG7pqgzGUmXvFSD895rwmJJcGVxVAoyXIKwKWugUUsRQdE4MaZTofEnPr06YthGoexPatzVeo4o8V5yxPvtjqaF2vHqe4bjbYfzH38nTFjG6mSu5HF5nWEXFVNHt1wzyzufr4cIbQ0HjMgvIv4iPCcL2VJp5IxZJmET3KuHwCwxloliUT3wMXoaRsj1xo/8j4i/sN/+iJrDzoX011Odm X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a9c6312-19bb-4ca1-342f-08db20b20ee5 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:13.1549 (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: wGe9vUdPVyn6A7qlLYid3EacqnHwDSvXb5oWXoeWdaBo/XkJYg4ytVLp5Zq8VCxfh7SMnYzeeqxVDXMo06KMRg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759904405851095818?= X-GMAIL-MSGID: =?utf-8?q?1759904405851095818?= Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- v3: -none v2: -convert to i_blockmask() fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index eedf6926c652..1c6874b3851a 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -960,7 +960,7 @@ static struct folio * gfs2_iomap_get_folio(struct iomap_iter *iter, loff_t pos, unsigned len) { struct inode *inode = iter->inode; - unsigned int blockmask = i_blocksize(inode) - 1; + unsigned int blockmask = i_blockmask(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); unsigned int blocks; struct folio *folio;