From patchwork Thu Mar 9 09:43:14 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: 66741 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp202199wrd; Thu, 9 Mar 2023 02:04:54 -0800 (PST) X-Google-Smtp-Source: AK7set9iDz7A9G1p1CxoA4kpTWdOWH2+sv6X5ZPLC3V9DazaoLwq++DFZt8Hu2lsIYIHhiaBYCnH X-Received: by 2002:a05:6a20:8403:b0:cc:76ec:70dc with SMTP id c3-20020a056a20840300b000cc76ec70dcmr27007345pzd.26.1678356294049; Thu, 09 Mar 2023 02:04:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678356294; cv=pass; d=google.com; s=arc-20160816; b=E2T5gf5QrCeMPtsLyn0OYsd173F442Sos/CsULseuLoy8Ip199PGnnJmqMGo7nfZ+l ej2HcNA8itotCa+bPS0l36TSR7ad9daRSjzsRMSygDbnFTn12rRdXhdNc3fKxWGQf/mW jHffLij64fQGL4isArC+gs+McKz+mtwUMcgPN7MSmykkv2tHmNxs8NxlumMsO6xniYuG LNiKqO5ZYpJsrQfOiRYMvmDSZ+PKH/1ps5pCRj0eE1FB2uXjbC2HddwA/ftwKZimDn8g 6u9ZQi8yBSMNcy26OKJkQ9oamQB8sq4mcv30KK8EXI+NBK8bEHAmjoD5w9In/whyHBjD PO4Q== 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=zUYza8g2PyCIiC2OrOmKbG3IQTXkQ4xS0l+bQ/UtoeM=; b=ZoU6t5O3sVFaDZc56M0dA9lDQMtwzPOr/LKduVULK3ZeCY45wc3SJwbdTHf9zhRMO/ c0rkDBj7RHzMVpTfJWka34dTnbD610XKcEyVi9pw9pbEYrsuF4o5n0Okaywbbd6PF5AB uQ4WBLQukn9pt8i5AB13HVyJGwKzvo+zqQEIZmHuW+tPhnhe5UdxAVlmXqWYXY16Cwx7 ol8MBAOW6iobUxZ8s7NJMakbM4waiuB1cbTeQz7Xay4rKFYvI0QKlXBJ+ruaEXRXzQOQ C/jK8DQACmgwpRbdobNX4M8VvLA3tqDp2u1iqlq/dB2WFx59k8tQ72ybtbD7fY1bqR8U OJEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=KpMPMDOZ; 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 l190-20020a6388c7000000b00502f49a9b86si17492743pgd.635.2023.03.09.02.04.39; Thu, 09 Mar 2023 02:04:54 -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=KpMPMDOZ; 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 S231232AbjCIJnv (ORCPT + 99 others); Thu, 9 Mar 2023 04:43:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231360AbjCIJnk (ORCPT ); Thu, 9 Mar 2023 04:43:40 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 256D1D462D; Thu, 9 Mar 2023 01:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cyn7YCxxuNbOxWA+YYTRV8tYUDLT5HgTfGm7rfviLCvo8YHu1ElfhF+2gYgHGz1kuZVIJvuh1GeCWXKt83foYawjf5GunbgeVW8DS4U5z07fukFMNVjATuN060kg3XoBULOWiyF42qcKtSjwvoP3cZYVfc+N+0tKmr3PIIt3fjvsXThXysOVKwNFpQWWtIzmOF3u6UzC/7jy+j1pY+PSsQ8z45Y9z1uh3ys+pi7Tun5B6q6lWJ96yds8wicqBxHYgB9R9vrTjQE2Q6RmkJ3o6BR+RXTRgjwD0Ha8reeHYPISJ6F2QgmkBruKt1Oq0GHju80rLbnpwBzr9ldhyNZWTg== 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=zUYza8g2PyCIiC2OrOmKbG3IQTXkQ4xS0l+bQ/UtoeM=; b=CxzQ5LIKO/AVNQrWynR4wv8ePw+K/B+Bpj96+a6/YcM8HjJJiDw4InnL/Hk8LL4UIlCCTJH4iK/E3sEM7KSeM+uY5a7nePGNGSsELXIhpsruBj8dMpQoGy4ceuV3TiRxkYxm62AuAANMVXoKiBJ5JIIHc120BzYyyJU0Kcg4bRcFM5LFVbtaa5w9znf+bReHAGj3FV2ZY+vJPI6GIz8OI1h8+ftsXKBnaJw2LRQ9p6Vjisz7ilSm2IsV5iiA6pf3/dNxa/IguTpotqiy9X3n9qDXPqxxxYS/vwGn3L/blsELPk+TnkcnPlJ9HE5oU+gO3qb1OtdrL/krc5DeZM3AVA== 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=zUYza8g2PyCIiC2OrOmKbG3IQTXkQ4xS0l+bQ/UtoeM=; b=KpMPMDOZ9tHyaFfdBYeDIe6tyJnYr2ez2I5X8ZzUQmzCs0GJ30RAdaPPPZQr7kQnhvHC48GnVFlYtWZGGCXyNeA1u83HWFZgWGOjjn3E7svPHYeXKDvkET0/Ps9ZsRHNI4seeWkyFLnqf5tCUX3rHHtWW4pgDmkgba0gDXqOoLXdds8qWmtpeXAGM9cB1Njov7XRffcUoO73g1yGI1GWO4U7u3zEmWtyC7XntYr7w1c5VNWng2yljY35F5gsmqTnpMTkjkQqWM9eDHgkk2tQpRnVe8kD6z6uhKAkkNVIxktpR8xp8kbMBiv4iUvCnsJrn2BuOuNCXJJOlbDwzrABwQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by SI2PR06MB5412.apcprd06.prod.outlook.com (2603:1096:4:1ef::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 09:43:31 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190%2]) with mapi id 15.20.6156.028; Thu, 9 Mar 2023 09:43:31 +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, 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, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH 1/4] fs: add i_blocksize_mask() Date: Thu, 9 Mar 2023 17:43:14 +0800 Message-Id: <20230309094317.69773-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|SI2PR06MB5412:EE_ X-MS-Office365-Filtering-Correlation-Id: ccdfc196-f1b2-4666-7081-08db2082bdd2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qae3vB1q5azCwwMFBxFyNfulkS2fKl26dHrPR5EE2x89+PmGv+wkF4/+4aKLws+K7tg8UH2kUAZO771w1fj59D5/YRnvOqbqaNGxw/L9+6R4e9MlwrJ89LG+aO7hP5uPVucjhn9HQVzG7Vd6h1sTMpvYGa7IKcA0GqEqL9yOinjY54lR3g1tQX69gg1Pi00ck9+rrauET6gapdYqqNfoz4PIOKsXCKnpga8DbQZxpv/GOpKGazvOlVAvT5b1YOn8CoWMOLLFS0Vs1alJOdhrJ2tA7KMQ+MQn83aOHkYTfiGl9sb4D1H9XmVZasohnH9srt/IW0HrF2npeyFvyzcLEgPYNUft/Sja1P96GOVSsYR71QkbFBtJZRIGVzwSW3hJO9ZkYN5pfkRcKCQng2voJNcQm2Ti5Qh7HpTwP75UmRR81QjoosxLTVIE1MdfG+LvZUzPAqrcTQEzrTUkTu59KALngE4jJeF0asBpip6l4zlLvWphQvjvLEEOLgdbZUvs5ZJ1H7knJrSAxkroXDaHLnISfO1IphYeyWe0mDtbKi94bL3lPhpMptOweVXd5g9ZwVUW9GVZ8nbsqgXn03rA1zc2RDtPcyAgXSnEwjx88rsperdZf3ZiJYccY5e/8F3wxEYywh4ThQbzpCtYkRFaXGTVRZOtfJOTQaa0wIKoxcPcQdDPHm8Th1a7AP4zywn447BAzuVTD4CXEJHXiUq0q9byEhNehwijGoPn2g76q+0= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(376002)(39860400002)(396003)(346002)(451199018)(107886003)(6666004)(83380400001)(36756003)(478600001)(921005)(38350700002)(316002)(38100700002)(6486002)(2616005)(6512007)(52116002)(6506007)(186003)(26005)(1076003)(5660300002)(4744005)(7416002)(66476007)(66556008)(2906002)(8936002)(41300700001)(8676002)(4326008)(86362001)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Jegshxbn02X1nQ9NnM0gp3J6Xyonqyz267OOMRqinh4BkSeL3sTf6HJBFoQRg28Nq5NlTjXow0dveGB5xSz9VCunB/WBFaN0pphNfUfW9+QOgNN4nldxdg7DQMREfd2XUCC3IFhFKaFrSiUOZbAb3i3rNDAchTCFwbV24SswW1UK5wE5nopnBNAiGz2hr9KwxThzquTdnrouRTl0TCfLgdkEFTZ0wBnnCoO8hlKhqK1rAOev7ltEAKcwC+TigMLZHJeXcvNlDQ1RpPPidCu4J5ELguMtYxHqTHRoMZQkcSdiwmFSu+LDSg49LB1Fn5AqmF0v4sq1wMf1tJu5yvFT5V2Sn412oMxFKB1vMrhTAwut0jFKDo5fcbGmaS1D4eER2/O2TruCOHVU7gkssx6qWxpwH7WcTeElKeja6o8zNDtfymrZUIGMHmhxjE+/KO3/UtZfvX+67XdHrmo2zUfZ3ks1OwEQvXdUQ1C59ITLACRUv8pM8aEJUmFqWfKxE/A85CfCxspRupXXPmZNfPG2PqILBsqzlO/6Enjak8gUggluwzbWHXdtUkyPakMRPzoxfqU6SfX1DQtVJgsB8+BV2s56heYKICWrCvEBWUj/AdoFQvcVxsPwayzr27iQoQektPtXPWwVu1JrZC0iLoartDSVqhV7VhmMqUjANrmoE4+QViNwnKPYWxMUp9nexImyj6+OtaeWxcRgnFHIWu9/c62rBcyGOzWgZ6jj+yNUz/ToP+ZLa9ouML2AnaCvozxTymQL2aj7EVtlqTTO+ekKCpkxKj4u5Mve3JByPVKxjn9nF3RBTqSPdQsShpXZCqeNjaKo0XWfRJtrg9qdIjxR9k/y+gZdZ9rgTwvDSwO3y2sZ9ZA6ZoZNhtUeBStEI5mFoh2U9CPSAQy+2esQi4JqogFK9RrlsqxDclAhletMVoa0TaNIFMtFv6mtCcddU+D8de6fYhaF2b5FQ4AM929O/mwS1nH7HUx+WFZ6Zf0e5pmC8stsOkesmCF1xKLOMo73eIzcPGfGQKgyo7LJUG+S0ZiNH6xE5lRamHlvXpctNxsrC1HT6F4cIKH4Vhbq8uSM1k5v94WkE8a1nTJzZesmPJiY12EKS0w+ga05a2P8oG2o9H0fUymr43eWt3AqRkEDbXwJmQbmhelBqBa0YjNP1j5xcsbac9YbaVX1O+v2axGF3GSBuHtHLrYg89VoZuelcMJKSaUWSx6ezrAZvoTN6Vve9NYW0K0vzjIBIESweNA+UFUr8PHW9r9H1YV0zfTWx+KgyrUQ/afUCr+WbnCg7l5ZRavI/0QrMm9vrvr/b2ERtetmSdI9a/nitJ4/7Mv3qq7pEvYRSZlXmTjDm9eZwlfuQVDGkva875ouyireaBY9gj0KH3Ah3u+wcbVUeUxPuJwt0L3+e3dwfAfa0E9ixPRs0HL3gT3ghYBSrMzQAB5yWzUZI1dPOfa3oDN/PSFKfJNyREEHaq1JekyPDjfPuGXdZpJynIMF6/rkqLHLoj0A42LqL+5uzHoJU1uq13V/cLGA/EotBOlITFqskY8MdmMDWbiCAxhSRdoEr5ZKFV6ofdSTmnx3+7Tzol4eWcbM X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccdfc196-f1b2-4666-7081-08db2082bdd2 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 09:43:30.8079 (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: yFyq14KB3cuZWCF5cyf54mK1ICs+rCE80rakkE22SpYH+jFpm73e0dq8Ro89rResc+AGFx8Lcowq7SYuTmndCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5412 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?1759884129268194428?= X-GMAIL-MSGID: =?utf-8?q?1759884129268194428?= Introduce i_blocksize_mask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li --- include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..db335bd9c256 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -711,6 +711,11 @@ static inline unsigned int i_blocksize(const struct inode *node) return (1 << node->i_blkbits); } +static inline unsigned int i_blocksize_mask(const struct inode *node) +{ + return i_blocksize(node) - 1; +} + static inline int inode_unhashed(struct inode *inode) { return hlist_unhashed(&inode->i_hash); From patchwork Thu Mar 9 09:43:15 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: 66745 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp205492wrd; Thu, 9 Mar 2023 02:13:22 -0800 (PST) X-Google-Smtp-Source: AK7set/SJ0mtS6nDEGAz+6UTXfhCfUYyXjHanJ3pqlLmfDPd+lH11TO2P97uB0AOFxRjyu6clkSW X-Received: by 2002:a05:6a20:4f16:b0:cc:b73a:1083 with SMTP id gi22-20020a056a204f1600b000ccb73a1083mr18764190pzb.62.1678356802100; Thu, 09 Mar 2023 02:13:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678356802; cv=pass; d=google.com; s=arc-20160816; b=xh8ITOp7ehmYlMsBEwYpi5+WOvGeASw7jDBYGfJm1hsxMV/TY/W4BT9SrJ/s/zLDKs 3thoU+scI/Zku/FCS374ftIERAHhc9r+ooypo2hccnHwb9Yhr4coQYBcUlBDobslKR7E mbAOXvBCh3wQbVx99LhDUCteQ9iJvwzcMmj0myQXF/H4Ayiadf1O5pr4iRwGKoAKa8rI u2/NYugC9Tt9aJ2ZIdw5fzyDPOuM9llr596V0jFOt4AK5bazguc3tfz4XSsqnLk/SdNe s7n8hBsOLJh/CldhcBQd95DCtmLnSXv5pofK8JXqq8N6vV7hXOh5CiNylsPz6mkRBlCm FmFQ== 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=y5W73HCDgCnJlmeloyTNe6UjFXFiXr2cZohcMf3gTf8=; b=PKswkKpFg8Ztf5u70LLA5vdO98zfdH1oPUW2Je/Y3nLbiTJe/ptEqmVg4bhzfdibhH DLR1YuaIrOA3Z/+beKQqAUt+dViRkmiZrahUntTvWG/Qas+RDpn6mVOhAB2l3Tndt0MX aF5JVS5rIqkHaFYfORWTzYoEm7mqgOvYGAB5h0dIDHvdjzvEkkZQcieYTXLatnuVEVml 1PgMrchyZPJNEyeNLmc+d6qxll3cUZPKcLnud6JtEZed3dS0DeMFMkTIgUEutN8Va2LM eASjvMUBrW1FoZhEW6CfHAOoge/Z3nLqJn+C72P3+4n2lWa7WLWa2Tyj7oOmRfbJMMR0 gpCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=VVPsdYAU; 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 o7-20020a656a47000000b004fba03ee686si19143557pgu.202.2023.03.09.02.13.07; Thu, 09 Mar 2023 02:13:22 -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=VVPsdYAU; 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 S231374AbjCIJn6 (ORCPT + 99 others); Thu, 9 Mar 2023 04:43:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230119AbjCIJno (ORCPT ); Thu, 9 Mar 2023 04:43:44 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6853CB057; Thu, 9 Mar 2023 01:43:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bybth6rCiLFPcMFw/aDdfkZEP2ne+5JWWdJ3I/MlKZratAksTAHVuukjR8xu3IuxkAQILHc+5x4l+TaPI33xpm9NNWbTU2WdmSIBkXMByW3GsxVdk7dFtC8CONThw9/jGD+MpjIBoj3ZBk0wfrPDqotwW0rNETQtN856LvrJ20Gtr7+tivv6SoZ4PZznX33Hg55mdRsEczd28TsMu7gzlvSBiqbNAM9whVeNGvoWFmk8OVVaAO9BqzPuUvmwjUN7IwZCrUo75r8TReOFTl35460cSovx3uH/fmlCU9Kk4d1j2+NYo+m3Ffo/4UDj5bQkDFnHeExJv1UN+f3e+0hMdw== 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=y5W73HCDgCnJlmeloyTNe6UjFXFiXr2cZohcMf3gTf8=; b=airgDPfe/fCRG3wgrWc+5i3Eqc1fEpHj3nsayUKQYmEReZPwLSGVYV+eIE0PYJZsv+Gxj2fH2A40LRJpjb0N2/gQFQ98NVmi9scoE0u3AJAVc5ukDDbzHbDtcLl/LaElhgus6RifU98tZIsC9l6OAgnhXFdPxu9ZGxNBQGil1kNhwR/7PmKyZNHT5g6rxp0ez4U501j+Qr+MKJbb+in8tO7yD4xxxUrKrsCX2dY9rPVZUBZMorcASnlgEwHCqAB+WiCjoZALgb67fLmat89oDllOKZhHMSw91MOYIbYKVdreed3QOgHz5id1aqIBB6WYLgcVL87C6b3e0eKKZEIJzQ== 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=y5W73HCDgCnJlmeloyTNe6UjFXFiXr2cZohcMf3gTf8=; b=VVPsdYAU5uQdXI7SXxBvDMUs4+0KalJKyoEhDbM+cK/USnlqCNegQbBQOzU/WnbGO1NmuH6qZVHV6jWxjCkGmqJeJmzTzUl4YeO72kUTDOjD9Yoe/gCD+wXw7eGToUgYTuyfGmY1BN53GdhjoDEvf1zZy1zGjj6Ux7NjF4Brlcsjr4Jlo4bDNA7diNrbTD5fTgsP3ye1TAIjlhD6orSMGlzoIqvIi963V8AVyZ7a7OOOBfOZLzhvG0mqP7hzo+IdjE3v634W0uiErFwIMoBOqenQUdWDQrQN2YM/Db/LCi9I3fb1mfVW7Gt/NJ88Io5d7tmcG41dGOg06aOmALMwvQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by SI2PR06MB5412.apcprd06.prod.outlook.com (2603:1096:4:1ef::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 09:43:34 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190%2]) with mapi id 15.20.6156.028; Thu, 9 Mar 2023 09:43:34 +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, 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, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH 2/4] erofs: convert to use i_blocksize_mask() Date: Thu, 9 Mar 2023 17:43:15 +0800 Message-Id: <20230309094317.69773-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309094317.69773-1-frank.li@vivo.com> References: <20230309094317.69773-1-frank.li@vivo.com> X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|SI2PR06MB5412:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c373218-d5a8-4d07-1956-08db2082bfe6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 16pRo38/+tVOacbF9caxW9PZ1Aw17Ijt/trfca9jzTAsn9vS7f8lgqVIh0pya1rV+B/24JHxmuu2Lj1tbWgW0yxtPEstwUu0zrfudpJapOwhFaUrNCy9eNqxlygyK1sFh8LcyKuS/5MHKqdHsaaAk2e8smjmJVtknNkWWxYspvCmC0Nv60FoLSf0HAMmC4xWeayoCip2QDEPiMvvPUMVh+WbaVMzTnlgwa+w5mvjCMFrgxcanoa+zE/Lyp+UT+xR+4aGsx+8o7W2/qppScZkU+MzA3sybJGD0iHEWEQIrhHIEq1q6Ty/Tl3aRL+qqNbmF8J0/WmT9fbP8iPxLIqskTKlHiIqq/iYnzOdJA1EizyQf+H6lYmyK7puix4k/TXBSObOoy10PVrTMRlt2i64r5WCxNYV7Gk666MNgd5CkZwwIJ0QPUX+r/NlaSkSNE0So7COtbdLi13+CLXNeImalhaFyeFWxfQG9QuLc+AxwKWJ1Ey7PWin8V9Y3WjvDL2eyPMMFPNwUPO2Geu4nROqUw0vRgT79OKsUle+jj+O1gQtjre0esiJF8PetCB+Hk8yYPzUYo9ZSwRjMH5Wb7zYIOVgAcrU73M9l1Tm8YHqprsyWH9GwHj5meVU7YZE1TWO9BN8urCGaWcPm8jeMJ01PUqkIrUbWzy8ISYwhLgnd5UmLnurpQYUKBb9pEKy/fjELaMyP231YmXeqWO3iO5zH9Dg/6cl+E1VexLs2LtCFSY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(376002)(39860400002)(396003)(346002)(451199018)(107886003)(6666004)(83380400001)(36756003)(478600001)(921005)(38350700002)(316002)(38100700002)(6486002)(2616005)(6512007)(52116002)(6506007)(186003)(26005)(1076003)(5660300002)(4744005)(7416002)(66476007)(66556008)(2906002)(8936002)(41300700001)(8676002)(4326008)(86362001)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E4OaB+8+rZATElPiI8iRz2tPxJC46eXgVcrwdYk39vUghhE2ixVIzANvfIMkDVcJhHZ2dpib+KOA9LQffMvEonK/Y5b3NYHKlDjAuwyoq/BrrSpFPaSRJDQ/yV9B4/BGl0p8msunkhJSIxCago0Lwcz7gY/yj04JwBbjggYIRPDt/ZuaD9aO/gp/+oaQ0yyxeXYtVy44LwHEV+Bnk3u6F5vqXngH/gqbxKZb1wIkzWa6TCBMT3TMAiw/yg+o59WTui4Le/rPCMwpbfhYRIYk5CzETmhcT9HdPSqmG/vT2JA0InWkURk0+F7/ge/nh6qXj40fupMbkAgo2vTlyisgJPWih80lxXLcCftEyzfePwvGAxFBURh7/aORkqh2P9TAUjAB1IVOhfHODY+m2V47sowPocekQbbpiTLFpdI5omg8HNa1ZkNlm1Yv4FfjKZhq1hmLvuiWeyDubmi3XWU2ZRPlqskVDC6I+RPVUfKeq/apKHCYO566MroFfKi4AFL7h2SxjjimDI+ATyGTpZQu3kXAUmh/Gg1QjKFx5C676+Bw2CS6VSprCKUs3bkxYcLSLdTriKTFvtSVXLSOFxhT/d4K2+XSweHKUE8pMvVCfENVVqSHiQxJRDC8TS8zonAR3kb/LmRBvsz/kgk8AwowmNK5O//nYyRQd8FxYPtvVrEwngDdPS07+FQzcxhdFYboP1XSmQHrxOJnP2hY2owjMXgeuub8UcmU6otJZiFx9Nbm3ovhHXiP0j6v+Mra7y80FM7CgeyJ4mvOTJHIOLtile98kGtvzIlh6LWWEVg1mTf++ug5uZPYxVQprFcK996VEHvSjXof497VXKNzi5i+iqixdANUHRLBe/tmuYsg+HNA3YdmUG8QY1hyvI79TgAv9zqTo90xYdBXMQlhP2k2OqYdhjWzif+328sTIIeYT4lwGd2YH7ejyZHy4ZFo2BW5b2XQaMRXUEd22edWYU7bIrNf3fGzCbaGm/xOkmuvBG3fltukIP1khMXWOMEfCmtvQaJAj1MRhlOxNTFvtMSbUa3Vq4EkRL4lghPP0NCDJhmL6rffAbwtwp9buRCdhFyDWEnxcqZ0OJoOQLrzWMnymdaQhVxb9gDsC9gMBwk4ZIK/FFX01GZU61vrYlolBJklEOhMp+egm0sgWrqOKrbqzfKJhvO+fn/8Rzj6ovv4OHun4RePfUb+bJXOb10/GvhS30qhUquDEN+Oc27wpBLrXqHQtxiqcqhtBPqFqf5ZrDN9CH88J7d540C551eTvOzYK0P8YDo1V+3QCAyOKgJovZPkyWoxkX3GX0N4sjeD1KD4fze5PBCz9NQ10QX1Ip1AfRUL7BZrtvoUSqMdoJG6lPRGR5NWXedEepgVcB0qrTY1FzXqp1vkLIYux891xVco2CJJvHvOsHDFVytwqQm8otApHfrmRXp/7KnsGFHa8QIdeFF6bVDjce6bCqy570iCu3Sm9do8C8sGqqBXvEf3eVMvs0nJZ1j2JW4SFiguC60d4Maq2YgxD9nuH34sSBpRU8YXIzrlApGEumLFIDjOoMAzqJpOQcuVve1pmw2Cr1Rw+TbzO95gEPo2bqYQGEqS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c373218-d5a8-4d07-1956-08db2082bfe6 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 09:43:34.2154 (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: goZPO6iBPFWvLNTRXm1fIYJDPeusaXWOMYytJH9OJImHzVn+GB6MHvTpkBBpG2YXjbsbouhZG7AJZG/CS90N9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5412 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?1759884662420897288?= X-GMAIL-MSGID: =?utf-8?q?1759884662420897288?= Use i_blocksize_mask() to simplify code. Signed-off-by: Yangtao Li --- fs/erofs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c index 7e8baf56faa5..234ca4dd5053 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -380,7 +380,7 @@ static ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) if (bdev) blksize_mask = bdev_logical_block_size(bdev) - 1; else - blksize_mask = i_blocksize(inode) - 1; + blksize_mask = i_blocksize_mask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask) From patchwork Thu Mar 9 09:43:16 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: 66739 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp196486wrd; Thu, 9 Mar 2023 01:49:15 -0800 (PST) X-Google-Smtp-Source: AK7set+YIGMD953msekxMiMhUANNab+0wUWlS9fk7BXrEySg1054qSOowsHKjC90uOGe6b9l0jSg X-Received: by 2002:a17:902:da87:b0:19e:4862:13ab with SMTP id j7-20020a170902da8700b0019e486213abmr22611509plx.69.1678355355027; Thu, 09 Mar 2023 01:49:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678355355; cv=pass; d=google.com; s=arc-20160816; b=YTZEae0GNqOFNI42T/lvIqD2Vmu4r9sFFYdSzQ9+x9Cki/QeK9ya5/NiLo5iXNnPTr JARyeGIzJAvLTdOktLbSNVjStSWSsdo2q6XSuvCr7ZcIFeVVmLrLWKnwfpxsQnE9fIzh BPqqiyv4O9OHikcvWs/b509JcLDmQhMyDanajUzOuXLwAYq4vaOPHVlVO0ag82WTnII0 EkncGP5WHHxBcM7hWrSlIomhBiXIlFuaKBfbeXhE8F896aNTrdU3skydoqtrfYATUcmf g3TV8B3uBzu/dfpUlpZpX+QCPYSOU8unSAu4S4T95/zoJ/ilJAvFDRJCPrFUwiGRf3OI encw== 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=dxysiO7ajZ/V3IBHz9PgYX7dB+ccSu9ZXDYAdXCf31I=; b=rgG96KlLmyEx4oQ5us6jcdrLCiVWZM+v3ZC7/sNGxraaZ4KP+t7pzm1iQ6fX06js76 JoUNKF3/14tGB6bZOMwXLwmUHKdT9jQWlcu9IDoVJ3bai2NpoECeUBSwX4gRSsjSTvCW ZIgCDJkejDb3F2NpqbpduiIsfWGFoxvosh/wQu7pkQidnnu3KdCg5zedOEZ+Iz2veDjZ FvenS693WXOvESn2JldNBk+vm1t6xyEhWOKh6RoBZTGoV7yJ80hx/Bp41mwQSapNtc6o dPzDiWKs0nS8/WGXvkhA3HFOMWlVmw1OdUIqmFs3Frf0y/7NjaSSUhMTH9uWGFvvP1Y9 a5vQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qVLkRYPx; 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 ks5-20020a170903084500b0019cf1bde91esi16459944plb.45.2023.03.09.01.48.55; Thu, 09 Mar 2023 01:49:15 -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=qVLkRYPx; 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 S231433AbjCIJo1 (ORCPT + 99 others); Thu, 9 Mar 2023 04:44:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231364AbjCIJnz (ORCPT ); Thu, 9 Mar 2023 04:43:55 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCB5E3CD5; Thu, 9 Mar 2023 01:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WLyVhgFcZN/H8QaTyyUgMovYS3CoSVGE7uSfjQz/eCUx0aTRoSZvLBwDTs1Z1bhZzbPdZtr4WNisBmpEazb5qz8kwoPYNndWpWC9BZEmqbxqOuhMajJmAL0N6gM05VGshGrUWwZptpkE7Qh51+U1QEQ8hCEqVRsTtsiNAesFz+S1/z0Ne1zSAStNm82vfnFGgwvcGmpo82WQIpBFO2oIxhsoO4KnL8YtQmnqaI5ifmvvT/8+/9hny7yazMEsDPzCagoCDL9XYyawb3e0a5YHgsJGUP//ocdF9CmVnSxRwPdPJy6ZBaq4zCykeUwoIVzaHWrn5hYptwFL7/0UyXaJ3w== 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=dxysiO7ajZ/V3IBHz9PgYX7dB+ccSu9ZXDYAdXCf31I=; b=LkuL9pVj6wgb6JZLwR+I1YbQWqcNm3KFeWfJRB71HU7mu/qXzobTzHKwLAgJSEGNUvTdvqb+4vKu8nHvJfwX5ex9acv7hYthAtNie53lu8KFhnwsC6uAMXbUgtd2de6QJ2/1aawq7c77Lm8JYROcRlwD9PbOScpzYoVX3UheNsvLTZAMHHwtFna8WtVq0CicR0KGSw9xEXytjrEZhdhA+GLREK4GY4J8vCWY3OrKyANqxKF8K4BbWsj/cV8sc1moFIghHKo4+tKTne7Nr/jdUD6yUUytsSwdLfOm6vL8lfNtFLALHyj6v4OVHm9iw0INr0m5B5i3Sq5euA59pBWkng== 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=dxysiO7ajZ/V3IBHz9PgYX7dB+ccSu9ZXDYAdXCf31I=; b=qVLkRYPxnscH8/tZ9Mcf/22D0DW3OvNwgvWJCqx+Z445TIsBxQLlxYORijv4Rtteu6NETeY5fYrOmL45lNfgaFp27DV0aDjtxXYxFh5mxPSJzVxUfC56Iz2VkiRjPCVSMFfhvjVRJXtcdAgRpp6x1rJNah9JjUcawdkiC0wviEzPi03qC4Ks0Yw0r4EtDV1SsjnFLdLSvOE1CtjEZ6WKy0VnWscav7tFoQCh51nGtoPhFMQKqY/FRk6iNK9BOt8Uuth+EQSpfkWuu6RLdnAbw962FIeKsgxNtJZ98F8pTBD8tCXf9jSCn1LpBAyfLtFCcyAKTUSMYyZkZwZ3/CPLKg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by SI2PR06MB5412.apcprd06.prod.outlook.com (2603:1096:4:1ef::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 09:43:37 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190%2]) with mapi id 15.20.6156.028; Thu, 9 Mar 2023 09:43:37 +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, 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, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH 3/4] gfs2: convert to use i_blocksize_mask() Date: Thu, 9 Mar 2023 17:43:16 +0800 Message-Id: <20230309094317.69773-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309094317.69773-1-frank.li@vivo.com> References: <20230309094317.69773-1-frank.li@vivo.com> X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|SI2PR06MB5412:EE_ X-MS-Office365-Filtering-Correlation-Id: fdb44c55-1250-4b6e-a1bd-08db2082c1c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZgK85Xs/qn79iTJ3559oP5DvbzxAaUrb0JNiAF5t8r4aAI5dmGXPu1AB/1k2sMa5e6YTeO6omL8zcB/QCBXdHRC4Lp9Ernpe62BXGj0ZF8TDFWygbVpOf+B6AquX4uAOeP5BMt8GROSLbY8kLPwT02uaI1VAFvT2zuK0lVQn0U0XZeFvzAjH2LfTbyFCaDElgQciLrre6faQnPl8lVwoqQf5p3KcSQ2yY2v+S7td2+qAqtf7qkFAXqbnTY7Nm1gNVMNesASgyo7dinkfzMNpJOHqgf3UUP+5kt7W5tRvWGaQywRIzZo0vQXAKHDkvqezjBM1pzGr2E9fBP5eKWVODfONHiPE9uf1hDCGct1kKLbUP1+4Y7AUQm+EGMe84yK/GRFDF6VNh4oa2cbChqo0S5ERj1p8RFv27OxIWrNS05x4/FtFHPDhUx7Ds6BW6YXvFRQNtHWZnADYGAnn1r11iLat3JB6xece/P7TELvqG42+cs5w4l9OBebxQz00MHybfBS/ByTEiLBDSuDEBMhq8Y3X/JdILNtSWI6FRJsGNfiURBULICt0MyYK9nDvVfhQUV52kATZu5ioBB5oNcSA/Kvl2NUjBK9TGhxywFZomIbMygadJEihN5PQaDrDqj16sdXRmg8NpF8oKvr1UP2KYrQ+nXe/sPRhT9z+0sLCx3JWzpDNG1vBUt1+igMYqru2Zh+L6EZSQVBsribsE1/fjeCy5QI3AiT05v6b73n9LGk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(376002)(39860400002)(396003)(346002)(451199018)(107886003)(6666004)(83380400001)(36756003)(478600001)(921005)(38350700002)(316002)(38100700002)(6486002)(2616005)(6512007)(52116002)(6506007)(186003)(26005)(1076003)(5660300002)(4744005)(7416002)(66476007)(66556008)(2906002)(8936002)(41300700001)(8676002)(4326008)(86362001)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: K+jLDIfmak5fUiEtamrAa133B3Ocl09F7d13JWK4V/bAgiMNIMVbTni8TnntbPPwe620ISqLL01SP73yA0zkYuSMKWqE6UM+pa7Mnzv/rY1hXNYd+ZCkmqfFjktIzCjQTLYpZZB2KpJNXDWGIjCmLDAjsedUZ9xDU0K8/uIwHmabM3H+FcimqsRnqQuVO9q3/kqoIPGKJpRICWYxcV+SjSQ1FX+SvcBarkSQwp1KIsG/g4gKMFMe9BoTd4Z5/IJBayrZuLAhCXChuTpHw7qcPg9GYoIltsG51A6te1DlfFLaUzGC+XYLG4AJfTY4rr/lex/WtPi4juXjjVZu8q7Na/cWXEj1TamuryGMRTDBsehHyIBof0pK32VXoQN2aOeZBPw1aovktpOTSYpgnL8ncwa+3mefwAbzsuy+tE91kXQdy/QnDISwsXYHG2Da6eRDX1Qajck9E7KWmzHJmqjXtmWKOKi6RhNhTXfJASjd12mYkV4n/6QattnbzKjgEma3bYZKZ4MJefLD55ZEXdgoimHBaidosqCy9QidJiIyCK722woDsEdUMWZ42t6y5ywe3uCSNM7bAVkN6Xcfncj1A7IXdpy5oA185OHjWNbM27lkLB6SLcuVFIGG5WkmrP8FmTVrRXuBDXCVWiKJmdc7++jql9Dnfu4KmrobL2orpbmIN97jQqZqs6qpv1s0GEEwlcCFctVQLFrn1PfW5lblY8ivgqlzQXdyQxvbNJm8FyqE+7rFILEt+10rCBvpT0SCN3sYPkO5fXLDKTkSZB1Eu9Cs99mUlU3z9dEGcWweq73wPp+sNyLcMTqHv7EQyP9jyTp9El4POOBdrdo+/n4ppqm0e5iVI8kXia268iDzSRp+CURQzIPBLHOBr9dqqM+Ydqj1gbx4cxxUVXvMrKZIpd2Q+HqUPe7JQBMWIn4UYujxEsytLku3C8Uum5oBm4BQzjP4iHoFr9wxxQ/jaXLf+eufMSv2xUPoUA3KxZwms8zYKc5D8go4/iWQSWLXjGoQPDlYmWWRZWzU6ik/qatfV9XQnSSZYg8yIVG29lnDovmKkL7+mn7zSvFT1ffMKVCzGhZN0uJ3C47QurgSmjGVmIFTvhW32OVdqcWV81Xd5CeZTEvpnkBK8CDoCu++kj8gcsmoLdniwQMxVtrKyzCfwCqLGLxiMPoRaWR+7M/JOqAhxuKX4aYGVzAmY7ct1DnwW93jydLvcld5/OcZkMTGU9owEVJs6CxrVgeVInqIOoPURPnet1wLOF4GATJcoaUi2ZjjLIfApm35ueFhvUA9k7oz88+eFd5AIp8jeUoc42Ir8s/HTXIx827Ww89VW/oDCJCtXi07PDSbA6DHnKCQ7pcTtramKQ5eS+QWxWfHOPHdLvZqAno6DTYOD4edx2cf9bpnlKJP7K982HsP/d7roKQD16h+jE0y+qr8VlJimixq0SUyFpsGvj9GehdvfGtmz1pCLjaKTnKz6a2vOWpHzHA9kld/LdEAqorADv92j3C19Jj8VDpsYQR+wWifBRlMVC/wFbOQYbwy689JQcuutEpW79x9v/bI9JvnzSHnBK1iIM1J//RyAwT2O4kRFCJr X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: fdb44c55-1250-4b6e-a1bd-08db2082c1c5 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 09:43:37.3880 (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: rUbJMThK9/0Y5/1w0Kp2MLXdPUxUR6tNr8p6/f3tbF7DsJYvSdWaZxMVdqVNrfm9n6UgOd7C9+IU2L8H/inuxA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5412 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?1759883144619964978?= X-GMAIL-MSGID: =?utf-8?q?1759883144619964978?= Use i_blocksize_mask() to simplify code. Signed-off-by: Yangtao Li --- 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..d59f9b3f0b85 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_blocksize_mask(inode); struct gfs2_sbd *sdp = GFS2_SB(inode); unsigned int blocks; struct folio *folio; From patchwork Thu Mar 9 09:43:17 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: 66740 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp199905wrd; Thu, 9 Mar 2023 01:59:57 -0800 (PST) X-Google-Smtp-Source: AK7set8pxFaBwXeifJUYgFfkCk+IdFBTbeMndkv7ILbOgrHb6Mzk9i3pnHLgoLBBlTCJtg3YjDKl X-Received: by 2002:a17:902:bb8c:b0:19e:72c9:7ebf with SMTP id m12-20020a170902bb8c00b0019e72c97ebfmr17892387pls.6.1678355996868; Thu, 09 Mar 2023 01:59:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678355996; cv=pass; d=google.com; s=arc-20160816; b=tcXpi33Y/8vaNIjsu6OO9MIhCO1vPPdP9bcTl5DXtX0dCirLctlCou7iBO3vFoDT51 Q7hL0NRFwiOx9WTn1u+wRB4xhG9fXyuR++C4d+q7bsdPb5+Ywxg/nK+k7yxtyUKNlau7 FkJFqmU9v54mrsUjPOBwMBihL8CfYjtM+JsMVpMBYdM9om7H/SJRYsymvNxREVDTuhZa 8fLnozmOVehHzwV0sGxJnblw3l31S1I8wihHuQQx1M7z6gOdBHqp4orn+XNJmUHQd/H+ 7DIfLLL8Gvj9j7maZjeMHMq7Nw8vVe6LuohJ9B6l5RQr6eftFgoEua48A3MgTU38Bun1 1loA== 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=i6ywpp+MaYfcDgiblrRoKLkbtKySkxplHkGKUqIFFfA=; b=Zk77Uu/DDpBumdGR68TIvn/8xbtdUQZzpDX03e1OgInISv1+whATT0088vNTF7MXp4 4TcVL+w4wq2sHGEmE448k0wYEDnr6RLpasdnH5cid9873hsJwMI00C9U3IYvb8I5V37P Qyj4dxIAaS/kLvSRTev/aMWPtSZe0QdR+X8i+8SUL7ogQYzBCbWdvVShIovBOxGLB9eq 4VVkvjaPiJIL6AOWtAGogukoDBmY6rUKs9DJx1gBY5W/nWcQNrjApgrAAxDCug9kx7Rn L+o00O8ZUluPqxapbrMWFrPc/gfbhbUKVwqvh+mQsFcb7uzm4DjoFwJiTK2WzSJRZTgx Cyrw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=AQDFlzFC; 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 kk11-20020a170903070b00b0019af0ff58b3si15722868plb.388.2023.03.09.01.59.41; Thu, 09 Mar 2023 01:59:56 -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=AQDFlzFC; 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 S231199AbjCIJoq (ORCPT + 99 others); Thu, 9 Mar 2023 04:44:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231162AbjCIJoH (ORCPT ); Thu, 9 Mar 2023 04:44:07 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2104.outbound.protection.outlook.com [40.107.117.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06FC0EB895; Thu, 9 Mar 2023 01:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HtCbZeIxuZQ7kgW4cmrm6ijN8dU3RA3sS0sm+J4AzzvKm30o1F43bIdUJLyiaaGahTtWlo+wPzo7NgeASiSBVHA8U2szobdA/s40zm8lfCsL+pKV0Yyl0hKM5Z6r0oVW7hQdbLYQ2Lz0Kqw004wpYFmpoTxuBb3OuMrj/F2rQmZKaxdS9bULF19CgPdEbFkkUYGqu1uf6E1KQQYFAs13gkI57uz/+O7F3afaiGR1jBGlrE1Gim+4XSWaG0UnhgNOKmyAQ9fn8Tb34fcpE+ZzMrhvP/9dzcewAbQmEKFafXNAGuD+0A8aYTB0nJUuOGbFPgVNtNsNYWQAHV/e5KiBdQ== 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=i6ywpp+MaYfcDgiblrRoKLkbtKySkxplHkGKUqIFFfA=; b=PRhKcatFPl6JjmSo/ZjX44nKLyU3QclfsTcInv0zneZdv4fV1Z0tQ1lXgSQwHLJ4S4ZQD2TFl8j5Mn3Y4sOMEDH+kFN15cJ0VoFC36qLwhzaacZV4S/1b2N8ahFSniMJeaG+Q9yB+RtRTpRZ3jTybFraxFU0ToDAOXz0RW848cRk1jXiXRwwjuGsvUe23c3CsJuQVyHtrGpatcARbk1gSkBryOm0P5yklMjKz6AEPwqbCBsGMnVMmiA30oI3xVIWFw1Aha0DeF1Tiq4U4WW4bBcz3Ue04JH8DTvKDvnuxo4ecbS2nl8xgmEijOtSeexIuDG/vFVpXwHPuRBTEdKITQ== 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=i6ywpp+MaYfcDgiblrRoKLkbtKySkxplHkGKUqIFFfA=; b=AQDFlzFC7ujy3ZszvqugZ0RXOUbZoHxav3QIxDwcHEE/Y/AFsR7D3a66r6X6Y+4DOQLbH0rtGatGJbbt2Dfte1oii+tR3QbQzem5hbxGP5MfvS3ZSGPvG3gmuqACqjRQQobbl4OtQUuOtBnvtDXNw/ppvRJ1/a+5VEeJcm68LwGCH7+ByIiu0iZyLz+nTdVT9XlXD2ml162/5K35j5OSgcsVu8t1giT2cwNus8K16Kpw1F6Fj5lp0XpBRAnSdrrQ3ClThQoHkWDB4AzyXyhw3keR4ClC9c803zJyLkfShYcF9Ar1ZQfCAYO8DUIVQCxEKT9KOnxJYjrqQzUxIReSbw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) by SI2PR06MB5412.apcprd06.prod.outlook.com (2603:1096:4:1ef::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 09:43:40 +0000 Received: from TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190]) by TYZPR06MB5275.apcprd06.prod.outlook.com ([fe80::a2c6:4a08:7779:5190%2]) with mapi id 15.20.6156.028; Thu, 9 Mar 2023 09:43:40 +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, 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, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH 4/4] ext4: convert to use i_blocksize_mask() Date: Thu, 9 Mar 2023 17:43:17 +0800 Message-Id: <20230309094317.69773-4-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309094317.69773-1-frank.li@vivo.com> References: <20230309094317.69773-1-frank.li@vivo.com> X-ClientProxiedBy: SG2P153CA0035.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::22) To TYZPR06MB5275.apcprd06.prod.outlook.com (2603:1096:400:1f5::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR06MB5275:EE_|SI2PR06MB5412:EE_ X-MS-Office365-Filtering-Correlation-Id: 18824519-4917-42eb-ce3e-08db2082c3b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TaHlsuuOtIbomrEbun33F30ugrEOXJ7z7Q0SY8cVv5MIrgmcws0LK7tyQZFmF3bUwUXeqI7LVKBfYCvaPng0C77rfeutDLn4OyujHQvBwfxkskpriI0FTwFqZq3B3AJ1tc0Alx8pwwE1Ab46fSuk4WcqomTknLdGzQ0J6AAfbpPOXyvZkxfjzFk6QEYXYrgRxtw6VhCjCZGekDqf8rkVJ9bjvu3WIpDaGE84BCGs4UDKNiWMztZyhRM7h49QmC+W5Goxk+KZBvv8pE4Su3V2Aw2gmLNfMIQFo0Ympkre1RT4djoYHS98DQx9DkRGSnDH4z+yRO5aadNfYoELxV3+HknxoEosXEtK332zG8T8rFDqOR1p1lFG/kF9GXvB7XM7eZrH5zeVTfbqYLAnxO8N6e5fjGttoiXZ5B0oo0N9rSFo1XjOATzpboTGwwvJdqG6p2VjBVfx6KWvB7DG2XNS6YFPUAm2kq3ijeTmL78/ydOglM6Qyz4J2Vj6aq9cWqdDTGHtWEf0F+aiIXQk2HTgrkkwfXy/1LXtIwqIvyfu+zrmuDfG1qQIVz6yUllwPHM3Q23nFpqOQ2KSgFft73TbsCavC9J3aU0Xbja40jz76oJK71ItSUY1u3/kS+pKx0iuklIGW9Qz4mShWif9RF2UuOTatV2LlMLm+NVrurURe0t11O/mtVln27yH1MWWlvoJGQoznXJ0C13iofVMz3x61oEoZXyOXBFZWctXNTCv+QI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYZPR06MB5275.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(376002)(39860400002)(396003)(346002)(451199018)(107886003)(6666004)(83380400001)(36756003)(478600001)(921005)(38350700002)(316002)(38100700002)(6486002)(2616005)(6512007)(52116002)(6506007)(186003)(26005)(1076003)(5660300002)(4744005)(7416002)(66476007)(66556008)(2906002)(8936002)(41300700001)(8676002)(4326008)(86362001)(66946007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dT5YCFQxsInUBwvXpmWXZj9wZoHXHujQhOb8lpLD2Ey+tI7ENdFBD4Qk1aoHs9Yo+ujB/GCFUm0ZueVSgViCGVXJEsvV5KPjzJ7uMoibPWm+ITUo+JKLXuA9YRHMQr9weeA/0x1cFPW41U2EyzdeS1xJ59Kz+dAYs1Y0VwlbLgihpurmOWWIPJwxyRyertu3gwJZVdBgzrlpYP1gBoTygaSgMZ0SIabtawiRzDxq2Y+0Lwo0C0x5CuQRMEecRJWvzN1ZejVyuSoCM8FpRpoDGCIqyZtwX0ucOqWk9JKpND2fYphz81dvQAz4cDWKXST+iNuqtmhicgXCwyBXNM58lJUz+cJLKB2nnRBVbN4LzT5C0ZTFORSAXHw5IvJZ6t61U4JCXXxYQuLC9PImOjx2FnmQYqpYlWvdmhpJt1uEOor5n+gcDVuTYnUA42rMnGtkERVBUD5N1RjTFDIsNyJ7cmHK3ROZv6V7IH1Jgp7qwpuE2Q4H508kx+OBXTupuXSG8WYLHB/BedzxRiUw9URpZyaq0WJAmbVoasV5o+S13LPVsp0sTlLbNy1RncpcwLHn062i37CYNwSc9mPbTlXg0XnDnuvNs3hdt7Am+YVzbIT/XtxyS403FG/vkdvWQmbS4HiT05zkwBiftHNsB8ZAK4rUKlGWddzbe8d1AAeydrlrcToE60UO8jpDupqOWYFQwa4meV1Oihz5Cq1Q8dZBg83gjCErAnW4noSsH01OBqzIT4ikAfRg6dO/qkipqdzeidBG6DWboO0m/7O9E1Sj9QSGATj6yPi2aoHNJ3vLw1uWT5dyCwG8bdgPRSj6TV5zcFmnnMlGRh7FCU/lZciPhKyueWJiqoFd5EquCbDo9adyi4bjZ8zKB9CQ5+HabhKpv2zFm8mwfRJ7gWgga2iIgsqY8sp+pwo2yMdVUbIXkoh1nTYeZ13zGy8e5Qx9yqOn5/YxApa4fY1ms5tUX9wxzsn05ewWzRSbBkvnLe9t+lr5fDYU/y5QBTnnYvzfDhWIZPyHomSjLxwgflmVU5dXsEHCAFijQCyyLaw7P8+dQg8CAgBvGIy9jVBXgMqTlcdKmB2442zAcWIZuo7lQfpzTKYqxfmXEBeWazUsxN8bXgCFuB9QDrT77vAyODqeHJZWjh+e3O9Q9Yu8bUd5moxjBNN8aj4/gv8hHKQD8oTNh/qn4VP+wmE7LdBcvkTVCzx6PgW5kLjQF3u2mk5Kl6YKlo1i2V9jy5PAK+xXqzpfUJ32j3t3KMzgJFnQc1dx7dtGxeo7RJof4Btzci9x2JfKMJrw6dOXPK4rpbPrf8m70s+WgTBD16Vhwy8XTy+XeXyPJVhlrdwVS9+xijIou1LIQasyYCFtzYESsT7V46bFIpXGXRx1EPQm5eebe55NSaHgtCYowfl6UlKiEwpHZpzOx1SuqOqMiScs1g52MDJNUcojQo+zBMK7QTkYV3s3G/Du5pc44CyWqoI5h0YROcP8gRTFH5nJdsVw8SqQW8aWgdDRA3fOWXxA4ZQ4A/VLOhyI8zoMNkNV2+nVmNPgsN8KYF2EB6oLoKkcyXwx3EyEE5FcyKTlCniRUJylsZeKkGh1 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18824519-4917-42eb-ce3e-08db2082c3b0 X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB5275.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 09:43:40.4663 (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: AlXPPrRhlYwwhInBgPc50XLF92eY/8oke3tOmvR9MAg9qpaBSxwKOfQiIwTbxmoGtdOuEwNvSUeJFKREimDDgA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB5412 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?1759883818086534584?= X-GMAIL-MSGID: =?utf-8?q?1759883818086534584?= Use i_blocksize_mask() to simplify code. Signed-off-by: Yangtao Li --- fs/ext4/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index d251d705c276..c33f91f3b749 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -2218,7 +2218,7 @@ static int mpage_process_page_bufs(struct mpage_da_data *mpd, { struct inode *inode = mpd->inode; int err; - ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize(inode) - 1) + ext4_lblk_t blocks = (i_size_read(inode) + i_blocksize_mask(inode)) >> inode->i_blkbits; if (ext4_verity_in_progress(inode))