From patchwork Fri Mar 10 05:48:25 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: 67223 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp702943wrd; Thu, 9 Mar 2023 21:53:38 -0800 (PST) X-Google-Smtp-Source: AK7set+yfILQYA09mUbDkirsdsTY0W7UZPNJPspmVQaibMvJwF06/5dggRREZgFoN4M1u+ARNDzC X-Received: by 2002:a05:6a20:4b1c:b0:cd:193e:ca4c with SMTP id fp28-20020a056a204b1c00b000cd193eca4cmr22932269pzb.61.1678427618493; Thu, 09 Mar 2023 21:53:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678427618; cv=pass; d=google.com; s=arc-20160816; b=H/NR8zOGhYlF2MAGhzKKUd0zxxdYrsx20d0DBeb9KEhu9weOEfPkPLKUiGAe3/VnZ9 sgfhQUy8q6Tf04huIxm20m1t/q2MmDfwNDPkU9DYe551ZBnZvJuJDC+QKptNiO5a+EDJ lKHJWyUEHViuUVZ5pK6S+iytg4Yfn7t6gH6+wknfoF9Ryi7tzWxtPKRWnh7dp8tMe4rb wgqdGc9MpL3v7awRPrS13rJvdvak6k/Rhbs9FsOumnqKEc6zzrGQcpkL0b/96B66J4p1 Fw9Q1PTrlf40MeL45G1KSYV4Tn3poYyOijf3Bw+e7Ebs87hzcUqW38136dOvgdugpxGD d0Og== 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=3TAffNeOIPDXwmJpJmg+oAqVVOrB+2BtWDSDZs2nixE=; b=ZlLTKA94rIWKZ71obdBtpk9OQKTvO95+NVIA433vAkGnS2eLUWlIiC3/UQVwu4swPH 1AlbaEuxZBDT5qurpQSUbPqXqdHdyHMSIgtrSIVYDHuyfvOyfmd3N/dVA2Kke3pU0pTf s9+51M4q/NSj0ZM2B+XeXWNnKBUl/DHxoa0zkSYUlgw2sdJbk1FcW9h7eRyYWnTmxk8a j5XzxSVbJZRFurJ+SfC6mSYJXY9q0F9l6yXY7pSQl6pxTDKHftMKQIfel7OJqsaclsZ6 vzOYcgocbYv2W31NmFEgyjc0k4Y08tx/pRsm+7PyGEk9iclvWWf84tI2HpLu5jTKicoQ W6Og== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=PnMuaBEz; 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 e27-20020a056a0000db00b0059232ab758esi1107680pfj.303.2023.03.09.21.53.22; Thu, 09 Mar 2023 21:53:38 -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=PnMuaBEz; 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 S229940AbjCJFtO (ORCPT + 99 others); Fri, 10 Mar 2023 00:49:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49106 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjCJFtL (ORCPT ); Fri, 10 Mar 2023 00:49:11 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2117.outbound.protection.outlook.com [40.107.117.117]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22220F98CB; Thu, 9 Mar 2023 21:49:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RwkRTiksMlNNeCiakrmb83uKXGeusGyimWPUXjJ3mO+HGrSuOJTs/ZY0dHCxieMNEUJ/7byyMduQneVy8ErbqnfjF78/AWF8LzRgy5DWyVOV9jx7nZT1ZxwktNJZ1sa0eQtVO7SUyvLuhTtxAVGcV+APm1ZMci/Mo6ir43Z4qh16e3q0pwP43zt36qnKIzdftSl9WhOuVaqBuwgZhHc5MXQHUNGEhLKWmPVtOuFycTmId18Y5kG9l/vpLil76rhrX14AXy8475uoHiuI0OK2bGTerrc4HkogaHy5TwKyBBzfCe94rVL/vcEeo2sZKNPjf3m8+YF6tlin1CWq8a1MEg== 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=3TAffNeOIPDXwmJpJmg+oAqVVOrB+2BtWDSDZs2nixE=; b=hi1wUju2c9ZwhegyrxrDv+F3AlPk2VxMa2fDoHB1ZMgRkezMKQ7a1LDcNtMTw90Klqvm5s714/R4EOi3VdjVnnoffQcnA8S4X44/3QXXn4PllcckrJYqNuKhyRDyVZLeP+Ea4RgmTvNdbcLKu+Ji/lMekPngutZisZMrva/apLWXo23jzvWQ5INVU1x9VTpU6pMSpB4SqR26+P48SBNf+enqlXWT+d6eAW1yfUDywlZ29x6MRrE6GgvP55cGTgQAlSVL+xorJpLhFiYrWIXoaRFWgHZVto+acxfOr51f8MVk0hPNd6q+yzXkgrrPQlSsUACt4bgQqNaXjnt48V/4XA== 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=3TAffNeOIPDXwmJpJmg+oAqVVOrB+2BtWDSDZs2nixE=; b=PnMuaBEzswFltY0fcHXCO7pPnp2DZKrwcx9UR8s3y/hHG+l3R3mR87q7uY/aq/beKl+R8Ukf9KNVZUecw3zbIzerPjQNAdnnIUOmgyFqf92h4k2J/dm2Ov+dNPYt5KMHYiShkTjQCodOHTR4eKQIQqUfjAG0mw9spF8vz5Nm1naJOFmE0h4oUP+7kNNCHCceFlfmabY9bwW42v+TSa44BL+J10FEa1av0VDl+u9R8TWv+MNBfDd3/sahso0m1U/yhQ15bK9fnwJsUxx9pgoeIH3PkUVHP6TuT5ptWUg047+YC5dGWQ5A67HUYCoOSIXTN1YwGV6SqZwBEYsnmU20Yw== 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 TYZPR06MB6023.apcprd06.prod.outlook.com (2603:1096:400:341::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Fri, 10 Mar 2023 05:49:05 +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; Fri, 10 Mar 2023 05:49:05 +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 v4 1/5] fs: add i_blockmask() Date: Fri, 10 Mar 2023 13:48:25 +0800 Message-Id: <20230310054829.4241-1-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: f656adcf-6898-4ad5-6580-08db212b28c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q5loVG/P0L8dPSpzK4iqHvOo3G3acBqRX7+o4Q0X6w8SrT+S8DT8na1IHtp+t0Nd0a+KxLiV/YGfQBZBFl8JeQ4YeCp13xBXGrq8xjrREtuRmG6rp9IcAcRjWVWeNrH27dHIsEsz4Qbcvi2thbipeWR2MlZKEhkGXhl4YUcwZQCrD4OCg78xMofqdo9dQhIRc2HFF27RX/xkaKZGE0RBIU4sH9au2kaUEHGnioNyJS2VFnH//IGT82dUP1IkqBEWuar/Tzudp8lWOz+0xQaem2kEdOI2Gu7TQ3EGcYoK+TjxZnfQ45sJ4FU5V0LLhBsDslIOLUrb2KCFiuh3WEn174RJR90kXavhQ11Q4qztfm0d69QVt3ZvGL8KcEGEts1La2sr5kx9xzaHrHU0w+xrD0TwcRVCwe3IXp7oUSmBWAVJtU/rVM2kWkYrWDEc+j27xm5/YfVse8HC/2oTTPag+dlg+CqigwQTHaGZ/FgpCRSUUlhkh2lVBDlZDH54lSiiE/BPFd4VWyU8vgcNlC5+psPv+yVDf5rO4RtMFZMEazHxiKPZJmVRO5dtFsX4erUOkmTvpZtWwMa6SLc46Yi61wu1vIDrzVDxQfrNYBeGxPKUtKJaY3q2TYO7mWcK+/EU6vWHS+YAjowY5R/3CAxJ29tpTidrDY1hE/2qGcMA/i9fhsTXAb5CQws5POwxWlcKNKvcmb8r6t9/eyRlitjWxA== 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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aprk+g84nqLMpNNI5rUbx6iM5UMphBCJ9RK2qPxGW7h8m8JzB33rKsiQRtDVpqTgd2pTe/i0h1kLN61ORIlFcpiP2n4isWBMiYUUneQEvNgRxGy1UtDo01ctDy7orjvXIF1ER90NC0gvD3lD3XUL6L/xN+CMSuo99tN/nPb5hSLUEJRpvjUmiCyg/KQiGQ4eGfC5saOz53S9umPvgZKV+Z2p2fvcOvOt8ZCblkIGPiomX2QZedoRVO6/J+Pas2jZ9AlVIaGJd7hhpWPOz3WuYOyIQHVWlLXUs1zMVVrkMdEmKBSdeJn7sDvsTt35C4Fw9OtZlpgk+Kt9j2S/o2S3JveIIh2GdQpyjygtu8dvbJw3TM6Vl2goTKl/yxqnEyPeIwGXfTI5nFzIgFXMVk1cyCq9L54cYhNTcS3LLuSly58RXb0K+GhG2FUyjXqgzx8y9MNP+uTMHF6LOBJlnzqnHFIXWJLmQlfiFIg03nXNrVvgr8v+NukhifRPLYg4CWnJ786W8TzVqnEs6iiLfO1TAw354g19aSyYRMh1a+aGVEoZwFKlSnEsMtVZ7MYgwDkhgMpaAFzAldNyvxVkcdzWP57N+hkjrev+7rtzAvF1IuPceA0zNFqGxkCB4gof2eWz5E4Yb6b4bD6sHJguvsQYYzMWA6R1xIGOtXAtmDCOUr2+6J/XTRkdsjNL8dFjqfWo/NhSYUhxL1loNri23vEuXMGkJvhgEMhbZ7kVdpWaA0NBZ0toLmZ7zbM4e6HEs2m+L087UK8dFfEHw1vl+cyhLtRhL8VkRHwlUgJIXh2TcR8hCJK1idwUHduJm4YjCtPkWTmCqQmvPLqO5+h8Cic2DilnEhehXkbgJDNrtHSQ4WWw8V08JbcxqRusfW9U3SgM0lkDMJfYF/6qFZ+/rkrzprrfDUQ+oK1/HXNT8jOWTflh3Soz2LRmFZNq3NZmx8RH/zAn9ikbrNJ2F/Jn9Xs260X+8UyVLTcsATP6y9MrhbP6xY/m4SNERB8R1fGVt3J59j/nGGuyRwRgCKUaY0i3QAkVPXCfP7rrvAuNPiUN8NgbOyb4v2G45Ow08ZBtMUOQpugU7fg7FEFEQE6AYap2TlKeF0GGC7eUIuNwnuhNerWUdOrXCOEcJ1DHTkzkDceh/gcHn2bEYGxeppiX3jToHz8T6BfCh/+iqmiQwaiQGLyhMy0PRRo45RPFtFyJ8Rwjks5xRrAWRHj6nJpAeDpt+i462y80yje9Cd5WRn1dZi9vUnFBys9tA5/rWziHAe2+3Ppc421RraD1Borf7GHDUSb5PDYuaVNhN1VGcF11AijhZ+Y0rNgUD7FZnZcOVXHwd6Af/086bTtdDaUh8D6fIwoBQePvhW7XntN3BaQeD8lFToPFFI+A2Vj6WSJ8b8Eilh5aIYUPHMsKHfdpMl/zARi/k2FezH8OJgdhcRAFPb0heyF/EOeX2TLusKQHWcWK17l/0E0/pkiX8xi8akjCf7vUXM8xz4oJNpsB4osfWJS/7uBgRB8z9ZvxD3bpjQ2Pce49vpeyJoIF4nUIf4rNXW0250b2EBkBmkDPuA20By6EezsCBfMTa2Cgee4Np7PS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f656adcf-6898-4ad5-6580-08db212b28c0 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:05.6408 (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: 8GGE7Fo335S2snThWbu0+AtI41kdP2hhJuIk+9ccCwlb+qS60p9Ofe5+dBMtZRWhKpBx6n8xGTGX62ets8gdCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759958918300912718?= X-GMAIL-MSGID: =?utf-8?q?1759958918300912718?= Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b 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_blockmask(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 Fri Mar 10 05:48:26 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: 67224 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp702973wrd; Thu, 9 Mar 2023 21:53:47 -0800 (PST) X-Google-Smtp-Source: AK7set/fFPBE1F3tImc5Hcee6XZF7mu+vgHQNeBubVhqjwsJHXWDXm6DEqM8spTaldJedj6NLcfw X-Received: by 2002:a05:6a20:3c93:b0:af:7e01:706 with SMTP id b19-20020a056a203c9300b000af7e010706mr25267527pzj.52.1678427627647; Thu, 09 Mar 2023 21:53:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678427627; cv=pass; d=google.com; s=arc-20160816; b=uE8BSh8jSWxBMzxii6rolg3OeYEDMiV9C4MXs9LmgBWcqSKJHFu6R+K+SHE8Omo12w jV3BED3m8oNHcQQ2IN8Ppf3cId29Mg8TAFR0vkUIaP+njTmMx6/NXbDDK3+Te+c/7TKy klH2tMM4UY6/CLrizv1mK3biDBxu8zK6fuwMBQ21gUK3tzhUXCC4BOMmza046l6U1Uq/ 7qtFf5LQBQSFUW/cqadkec5vC08j0qk1Q8rlf45L5ZX+j9cadY8hJm6+hX4R4UWB81je 4e9V+aQr/VAKfyQ8Ortlv9skcRSYYXcc47dEVGuKuC5HnQYV6XT7Bedk4ZNS15Qs8Uh9 DF6w== 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=hc8PCYn/F+bBJwiE/Ok+CXT7KaO9/KsZNoz5vBuhjVo=; b=wVfSaqWipX0TC0dlS4PKlCyjQs3DeHQgWgTFmY8oQU22SzbnrRn+sgA8zjBIgdQ51z BM6bp9NioCKoWesugvNTvZ35o2Uc9wwVyoddzHc80CbBeFq4LGJTWuqVsANGrZA9GoK0 W+v9IePD5LbJvSAdiFZPbCvCTnmJ8iet9Mynp2BPRx5hFWtjN/8DOS4SWW17zNV1LDqp wi0EYsytCOqkAaoiI0HXN22IYsm8Q9kTl0tzoDEw+9eICl2LU7MP7lO5b6agTQFKd2sB uUxXm5SlXbJIPmz73CP7g75VviW8OKTzVp0+VWreQbnvTpyJwcovrMLXUlo7Z7fEVwAZ SWJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=DhrtnIpE; 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 p2-20020a63f442000000b004fbd4ae5651si1214833pgk.170.2023.03.09.21.53.33; Thu, 09 Mar 2023 21:53:47 -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=DhrtnIpE; 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 S230015AbjCJFt3 (ORCPT + 99 others); Fri, 10 Mar 2023 00:49:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjCJFtQ (ORCPT ); Fri, 10 Mar 2023 00:49:16 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2119.outbound.protection.outlook.com [40.107.117.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9851BF98DC; Thu, 9 Mar 2023 21:49:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BZBQI09aBrcFQwbdE1dSoCPoz9mf7sDp1znqN6bjvF4gIOUEkK1hP0rr8sZuVx0MGghZiOSDRMF8mnjlpXj/DyAqn8tZX6UbKIgMRznOD13r5NzOCF5usARHWIfsmMnbjQpXQWmCKjKM+G+NOtpNW0pAOLN6/040s4aJ/CDyidUm5m5NM74ghvqp4asPRoEoo1osoeGfPcaE2+XHw1wtDcPQ+lo3qMClFp728wJDwmFbVIv9onOeXZVe7FiAgQ0jlei0Qu074CGcVvdK5dX1ZcCndjWj93aNregJjEo8xJGc938AZA0SSGqkcemgQsRE0aaM1yVe+PQ0oAoT0bkaOw== 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=hc8PCYn/F+bBJwiE/Ok+CXT7KaO9/KsZNoz5vBuhjVo=; b=Sr1KduMnkzv3qTpFNVxEV4A7gYVokFxEFGme1LWwz0IxPqaDNMszYrmI3uyW6l4bYri//ZF8cfJaq65Sg/UONAmrxB1956pWUN1B0mx+DUhExDSVwqa52gfPK9eSyPS8B/LcJ2QaVJ+r8u7n8MOiV2367Kn8FwUiF3K4RlhFjhrPNnLNDwEcNs0zL81zS+y07VqLE7/Yo6IjivR9Y6TMt+d1M9mWd2+9DxjivIobTyVsO9vEeHIgv+SCaXPK5f354XZ2KLFnr+LXHDNO1WiZ0mg2wjcIsheFKkuvYVV6kbDrBwu1xG1xDJ8Z93etpCqBaBRWcp4wrnBf6lQjg5ypBA== 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=hc8PCYn/F+bBJwiE/Ok+CXT7KaO9/KsZNoz5vBuhjVo=; b=DhrtnIpEiA6bd5jbrLeAW7wLptcnM90lamm/lfkmQlL5gmtKmHyzzlPprgbOJAZlfC8jONDztrACNjyHM+SN25JDzQcTHEvkB9s9myCU67QlLDukXzL2yHYTpHQRKAkQmrGZZmSIkKreW/Z8q3Kr11uix1lE3a/oXYIf2xv2my49NbOGTW/UKhC43WHW4NBeKSirBsioRSVBq13+AF7qtN35ibKM3G1Nf88ECAfyrGKQz3aCwdiKtwgpDS0KTpNcLHyWodnb9HjrgbbvxP05G40cywOqQQ7Vtcsnx25kiXNRGYYOWMYU0XutBRUOVjYo75bIfGodpcTOCLgVltiC1w== 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 TYZPR06MB6023.apcprd06.prod.outlook.com (2603:1096:400:341::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Fri, 10 Mar 2023 05:49:10 +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; Fri, 10 Mar 2023 05:49:10 +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 v4 2/5] erofs: convert to use i_blockmask() Date: Fri, 10 Mar 2023 13:48:26 +0800 Message-Id: <20230310054829.4241-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: bcffa574-3eae-42e4-c992-08db212b2b59 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F09TohasIhTyNhQn1Q15MARbJIWHM7mi6dgLhf9/hSMOnolpvihaJxOWdp3xoMg1USFa+Ekf5868XXq2Cme489uZw0gqais4IgETkt2naElfGnKzMZzuDH/590c+oYQMBVfNkSX3r2aYX7p2p7iBEP4zJypqhMR/KpQwKD7yaIZ1XJVcUCLeTqZVCSr1+ItA7P1zD2iJGsh1INiyKWBqReeBoRX1yUUpST5LxqXgDhSUFLb+4d3K7IEkOy1X8v97NYtSf1iypG2DKeHx8+lr76x7xQr8qyVWl/fm6GwzLCSWR8wWHPSjQmZd1MMdOhbFOufxCxwhbLUWxSPhJzQk8Im1nM8cciSF7ap10AxlSlwguNKHHWaBNq2vhchbCkXIBHlXioDOeLLDK33B89Gq24Iwj/lKo8cqClk6ULcN30+Q3q9ifGQjruNPNQ4S/y30jzUFMAfM2J9KCrxalgsc4d7c98qU9JId7+70InSMScDlI/1h4nqQSsCYCLPIAQS7Eyt2atI0B++TaQwAjPIo/fBFMiUzWt9tSTlzgSfwlITtDasTnBqMZv4pJtGJaAWfLpOMqFQgPb3uyxC2zScz35H9++gW8Sqs4Lgy33zG5QELdxxw/77ImjOGEN5Zgf7buk0J/Fr5Fdga2ZDRa8f1wMMN6hfK5nt9Nbjk8pi9dY47kFLjQLE+E6ySwKjp3OiZZnoO9j7RcL6fii/AhdsaCCpk9ZiuxjbgWDcl55J3TpA= 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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: yWt6yC7hZnI+11hk3GMmC8uqlDpn5nk71f5MkLq9/9imI/I2aCaOjrgHQ3GhwTZpi1Sw/Z3ZVb9umR0DSVZKqz/b2J4PcnL3h5kMfw4bvBdvW39d4prvYWT6OHihxeRUgxdGORDP+9BYGeJhmEFrEkJDT9vf78k4wLOZahpwG7Z2Rm/EPWTnOZsBRLT6nOvkxyHk8rxZ6j5FHykyeoimJ7iPtoqs9OiFqo8uprbjxPJA1Z//iH4NqxN2ScUC9F00uvT21pC+UxzYPfkOZC4UGBePll4UmWqgdVOOK7TKcwj0CQry+6eBRZEWq6yqRTRJmDh0idS6SpO7Ul+uhQcLKL266cOPCFKdNF0Ci/jS3/GTXHjjfY3K/mX5r2H5X1HTpO84rtsNi+yGqUsiJ0OxoUFe6jzB0oGZvWYyzTY2y16xzKvCEZLy1OEnKDEtc6jBFRV7TuHixnY6EA8XC8vvd3D+RUjeDWJss6eHip0VmrFSPDWWD2l3jf42yMwN4KlGohfZ90NEpbGDb9NN12z9uV8PQqvpO2bPYkvZ7VTytz6IR+CVfAiVA7/I1P5sMb11vrjPiPAt51KwRz03oOQsc2otwtKLO0H03On7G0HGMWkEY4ZDHpXZ23ppXu62VFS8KQM++5YwQ++Rz6JHwkWorD7Ka/PuRh98G4X5L7IRZ6kp7a3JeSWGMS/31X0t6PlX6eEJPFoY+VzYOuEtBhxikuskwKrAYBXzkyagQMnRCKXc523jdi0I79f2Q+AdNPCFiwjPvHGvW5IFir3XwTD1rhbTWNPtlJdctaqGMnMK7gMYtv46FX5ubBfErdRdCXpPOrOSyVnAkq+Si3yCl72/VczEdpnNf4LAHQBoycpFE5P739REe6g16cIVf0g4oHWwJIFLxg91tyDUtoVXdvIBPULYfzCywQ+op1jd6onHzH+4udXKaoUG5tLihJCuOUe6wM3XUkBNuuZhde6Wgr/unyaz3RWge/isXAeQ5dB2C0GTMK0RbZ6PgEN1X3dV3RT/jlhGqTGPRvtvYNVQESuIR1uis4I95fJ8YiRDd7YZF9X2hpsQooQbT8JlnjVP2mrIDGomuLS0lcvjd1IKx7IUGG+ARShd/qIG0TjwClN5Z+Y/Wx1s4wRFUkgIcAEn/2D0gF/+fJimffq1rfGgJRTH5AuDP9YaRQ3cpBYU7SoEsLFATBzTuvyCdWWw20pLUwgyP8TbxXUGqzPiVYj+SU6O3JdGNifVtovKVWvBTvClhPQ4jjAUEj3YGZvjjSFf79lcjG4WW33GOXBriBCUO4+dIL63u2qG3+bXsvewZH2k6eulck6G3w4/9XoVtZRHlUnmz7f+YBHSq8M2BuJQEUOuzu4UC23xTaERcA4jPPjWDb5DR2AvsO518GvmpBzg+nxd6TGZ6kEGrUsA1PWvQ3RMq0g4tQAmEDJhXYyinpzz8pbdlkXRDc5y3MpImr3kr53Q8UzN1lbec3pwLzfofz6SvqTQvB8aBTniycCkipR88m5Wl6ibkSnEcjsFvf/GXlsLfH3///T0GevMkkLyoVwwCdzNkTlidXUjPLrL+udnTbHOVTiAQEKiifqBKCN/rDOE X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: bcffa574-3eae-42e4-c992-08db212b2b59 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:10.0015 (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: JMtR/Nv+Q3wGPOGsV84uFg0xXL7DCwcUMQwQtzGtUnB2SDvburE9KXj7IS/Yf/16VeWDex7mrHo+JAyGMNTiMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759958928461281591?= X-GMAIL-MSGID: =?utf-8?q?1759958928461281591?= Use i_blockmask() 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 e16545849ea7..d394102ef9de 100644 --- a/fs/erofs/data.c +++ b/fs/erofs/data.c @@ -376,7 +376,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 = (1 << inode->i_blkbits) - 1; + blksize_mask = i_blockmask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask) From patchwork Fri Mar 10 05:48:27 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: 67225 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp703366wrd; Thu, 9 Mar 2023 21:55:15 -0800 (PST) X-Google-Smtp-Source: AK7set+0K7/7Sq9061NDI82rZ/4P+edYm2wYkmi1s2bbeJWSRAtPf21ZP7NPGtVwi4Eo5Mo1axbl X-Received: by 2002:a17:902:e748:b0:19e:d89a:cf41 with SMTP id p8-20020a170902e74800b0019ed89acf41mr15715847plf.64.1678427715089; Thu, 09 Mar 2023 21:55:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678427715; cv=pass; d=google.com; s=arc-20160816; b=SyHAvgNPfEHckBm8P+CHm/2iAylEPI1Pf8dwP22bE7rylbmfAerAumlqm9TU3UkzuG sMPAkS2rIxkLG3ROFvvB7KCoCotvL8PLqKIHPWtgkFvJMshy0pHXhrkefpSozbK6tqZX iSB2jctIEV/PVYL4IRwJe5hPVSQiq6IIGDkBM/AzJeOaC4iKl/nG0B4yIAQwgiiZt1fT ZnbTsTOn555CFsIh4JlqIrqcbBnBYwshV7LFZ6aqZM/UFTAznng6xrAMO1tznb1cWX2q 3/smd9fjokBFQM9DBDlByojACg3b0GazrrL5TUJsoFpLVRmoXGbuiWtWpjLF8q0fTWBH 8OHQ== 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=UmlasZs7L9i59O960XBl4d3nj4wDOMVdMNim3PUurcc=; b=YMIK4JTzTtSuDWKs76C+JWdeiAHEaWUTK2cRUd9A6zOTszA7eS3BXdcpQklcv2Tp49 Uq388e66zvgsSyrhvwSO2hhZu+L/pQDjTK7cE5ANIDIE2qx6/hmiOtisKLvV/m+TJqtV qOJJ2gYVitX5MFpdOSDLw4XkfIbhnEUAItsqboA419003rYgxygDbSq0NXAAiy0bpIcM rXHHlE6FOF4lxgavewuYcoIBYB2O2P7D26xzgVGpBV1tpzWT/8JFMjTUyzT/ZndjchWv S5Gj8SD3hZxosFNPA4OeUQF533KwZCo6jW9QLktyh49qaTVSwFZW1pifQbljiOw5tdMy FJ9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=qqcZTbIk; 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 ku6-20020a170903288600b0019cd505cdc5si1209042plb.440.2023.03.09.21.54.42; Thu, 09 Mar 2023 21:55: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=qqcZTbIk; 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 S229977AbjCJFti (ORCPT + 99 others); Fri, 10 Mar 2023 00:49:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229945AbjCJFtR (ORCPT ); Fri, 10 Mar 2023 00:49:17 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2119.outbound.protection.outlook.com [40.107.117.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A85CAF98F8; Thu, 9 Mar 2023 21:49:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=llbxFj5A8Pbl87w/YTIVEIrd+dLjORS5zqa4RUc90eLMOGYyueJy9tcOtRk9vbjaJZ8jBG5cK2vCFkPU/CxmbYnJ59VvLL0LKf2VT8LgjyGvWKJLQrJzqjXINcFfZ4qsBtffC9DczNIXvLa5YYaV53T2/ehEMWMRwDNVNW7PXbAfqVCpAe+3KZZzIGzzeX/+GmD+meH4R7xo+Nvdo2mMIC+59vae9qn/toqE/1HdeLgLorSCbpOG3LS70uKzfzHqzPOIJ6AnS7nHPZ4lJ9RYg4j7iY8er6ZYsfDCSKiUiup4v09uwx1k6tkHTnpH1Zpx9taGFHb3ajL2gdxIE5sebQ== 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=UmlasZs7L9i59O960XBl4d3nj4wDOMVdMNim3PUurcc=; b=VFm+ELPcTfQrL67yRFEjGfVw63ChzoYW+cofV/6UwRZdhbV9A2Imi2eA/guhgIJUs0qeShuXUZiPvWZeuHFOA7G3S/p4IAA4vhorb9oBSLe9GZQak986VkENlezLmFXiyF3o9hrteWi2VQcEW4fsnJz7Auoohz/dqA8D94LdsabxTjmd+bgRN9e8uHLShKZoM1PP+reOS4Gf+1uWELpUUS4Ic2Dq7vXLL6KE1dmZLLVs6q2K6t1fURnhPw2Kyto1ooLrMjc+lVUcaU9JHGreujZVFdl3hrWkxUzc/Z3TxAiI02R3wjTSZ17/ZxW7qpNszXouorw0lTsz3YgpkMO0kA== 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=UmlasZs7L9i59O960XBl4d3nj4wDOMVdMNim3PUurcc=; b=qqcZTbIkOD5oSFSGF9jmYNAyyzk9qIvGt3UaUx9dSIfZcW1tvbVCTFDCGEqdPC28mP+UUXsz2K08YW8SsRW7ERdVfAiPaMo5vfDenRFMTbcczR00jtUmjjJXcY5vJuTz003xaHZi+j/C23CU+rlYVcIj8iUWBsDrArUC+k7xhmu4RkvKTxNMDlgIG9S4Y3D5XoVrnOXH6uhiX3ErrFj2MxTZbsCNyaUq3WNhVz4DY/8hu9Im7lENLh1dR58mVM3b0dG4r0sYKZRkjsVNIWVOSr+eTCAmbKSX3FX7G54zSZ2oSIORw5YB0M9CboDmtCxLBBZ/s3TC23CucbXV/K8S8g== 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 TYZPR06MB6023.apcprd06.prod.outlook.com (2603:1096:400:341::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Fri, 10 Mar 2023 05:49: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; Fri, 10 Mar 2023 05:49: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 v4 3/5] gfs2: convert to use i_blockmask() Date: Fri, 10 Mar 2023 13:48:27 +0800 Message-Id: <20230310054829.4241-3-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: 47e9e2ca-c6bf-4ac8-d9e4-08db212b2d80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jqOXpbKKBVqWpr0dTOVpkjybpTY4ounv9sUogJZZ+14GmnUxIJP3zAmXaF2q5jNmCgcVri2kQICUNGngkbcZxAQ7Z+/Yc3jMCy+Jbv6h4FByrtNlkrjEkirZ80P7SjsgDFmy1/sWGYvMGaYx4Wna3Fup/i97OQal/uyWBENzCaZlKjWPBsPxIQxuu5fyUkvqtUjyN3CHVCZ3xEQ6PWSqu5RmcqCyQ0fSlLAZ721hSEyFvUluxBxp7s+TrrNKu8GRfjIF07fJnC1GiTq1w02QEZ7dsvYDgNvXsGynb9o3D+Q8/g1acv3PVbKSMt+HvZjeT+hn6Wuvw9YWgLTXZb0LvoWVy4HOXVZrQkhuiR0Ljcl8hvZJF26EP8nw7hG2WnRzS0VWDFZe2NhB3R7NMmdWFKgiekq1Ozq7ksitzlajfKhpJ8QdquNxo2lEQ4thaD2cLHx4gl8edCG4Brt4JjLG3U67LD1JjNm7b7+pXNS9RHhPDMB0U5hmNivDiyWvNsUZPGv1/VFV/JuprsH1D2/+5DMpaCoZPZqQeoeLs5FcXryDDVxY1HStMQxjpJNDUotM9bSuZDyD03EjGEGOPExZXsgWZfcWimjYbbVvB+5olsEBYlSKEfhZcZyunCRYgyGwgznuKS4Xk6sEDYqPxOyfpyFZhv8NTed0731r9jsM7X/6LkoH5A/Je5jON8yAwjbeGfdL4yyRW5f/On3MCbhVyzO8k6ybrm5Jc1d7RxUgtZ8= 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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4JvqmstesADRGcqKQDYSmBc/deP9207tey/Q/upFcxNOzhMB1TFJ+wldA2z8GJ+NPJj0DtzgiUazSSreJj7+Zap/ChQIjlYh7i9ej+r0SHKGqPS2GkQ/pAHtrrkyPrTaoCkroed3+wpT9DaBqWS5GXrxRVM6zSOj24yE5Szmjwku2bQ2Tqaf8xhvR2P/Mc5XStyKJm0errjJmqU66o0CPrOfpoXMqanCfxq3n4CvNcdEW+yUZIyOfsurcRPJittQetAvrrK1xkWa0ABXA04PNla0/S03n+6tS6l+fLGq+/5KfXgWcH3ZxcF35sfAWFHYEAYN3Dm04cz7aIA3lndtrXKJbsoeKaK5utWGl/j57EDIZ4m4hNIn2B2pcBHTNqlowSO6rQz1q2yTq3nVf0EcUfErADRixqq6xoYHMZmPyJdnAWAhzORoNKI/bCgU3Z7GBaZejgvwopniG9hbEnSukC1ImKQiQH1054HEaNydDISy2Fro1nmwp3BtKTD+d49TxMxqlVDdEyduQ9xwTHcrraaRICUO0TMaoww8C3IyOBq0aTsybHD8vY24/+f/DWFHv9HKHCtdWUvmbCvjaN04FIm3NkQYPciOtlVKLDAV5NIaIUfA/R1baxJ2aC/gA+qf/ahQ48WtN14ikcEcu8vPHh/ZrB51sPlpec8DsC5tGcaS6We2IzuGUaSA5xUKXL2JDL+UCg0IBIcwiEzV/h2qEYvhDBQrzPEuClG9BD6xsYbuZahS+UDhVHV2jy5Ns0dwTo5P/CPagrGD6hr6u/q5b5blPPgBvSvhN0fnenmhfz0UuezU7caHCkYPSxUsJAkNMqt7BCV5JymTSHeqiv7VJ21qOC2rUmQ5MbKE1/EBgcQ0Wbwra5Gne22OsVh92FNH3TP59U9d5G7nZP6+C9BQYcgRNT1akHpNKnhe86X3o0akq0xHXrpECfwU6I9Lp9m6msVXmMafscERDv7r8QjWyNYDXGDzn2S6qSP6WEdQK0fDz28EWR5lbrZVvW8Snf6N7QInlCdH5Ov/HUoRTzPCw8Ca0AudjdRbxR5AkMLz5Tg4QqiCCilY+q7wYksKKW6r6dS2sgjK9wXvebL7TBWijzI0LbZjixIXGndY8S1r6cnNGZPVCBddHYg84v8E6Pgj8G8lAAbEIUkmg24SpbiHnKjrstqoSIVIefVFAaAx0CjS6gD2lr+mpQ15n+MTA1MGywnqjb2AbFV84ErLL1Celyrxt05R8gQlSZsnrnAqXfX/UTaL3hYAiHTHCe57W2mDDARZO8dRSCEY7sLK9D+3qJmzUv0KS+zUYV4lXvkZwI29Gjj0WlISAMFBPoz7dld6xXU6hSxiec7aLITC3ZgKkOJSltb6A3PmBoyt/Tsm6Zk/XJTs+y70upzL8vSmC9QFsYEDNe/hp2BJFdsoTz1BTws4c5V5r2EgZt/bhwWb9H7e002cXIwEToeYG73IalZ10jeYTHWLLEolZiHAHddcD1YPfmQoDuYX7PMN8aZJVOOFBHUhw2kXl4rG4HbLXflN3p1rzndEyrb8om+i7tEJthp6mkgf7yhUII5bKH5X6HaRU8o4F3OtahxX57cKp1il X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47e9e2ca-c6bf-4ac8-d9e4-08db212b2d80 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:13.5817 (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: kkZaT5SAT+VtFLn5GdMdMhP+iOBx7jEePtaccpqasgv/WkwLUSErXAHUKqvpIVncr5ZnpLJApNGFlGDdVflQRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759959019854982519?= X-GMAIL-MSGID: =?utf-8?q?1759959019854982519?= Use i_blockmask() 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..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; From patchwork Fri Mar 10 05:48:28 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: 67226 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp703444wrd; Thu, 9 Mar 2023 21:55:35 -0800 (PST) X-Google-Smtp-Source: AK7set/XpUiFznXKo+d9tWy37saOqInMy34+QOuUoZO8+9iID4UMS3Y4aj9G4kS6nRnZCJlEbjYs X-Received: by 2002:a17:902:ce8a:b0:19c:f698:8564 with SMTP id f10-20020a170902ce8a00b0019cf6988564mr31242470plg.17.1678427735036; Thu, 09 Mar 2023 21:55:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678427735; cv=pass; d=google.com; s=arc-20160816; b=kwUo8ONYB/NENunp4/mvCDdB0UxzWTYs8yUCZS0wFBY2dRKnmQgo5MW099vyenKW/w zsuJoHQQwXvPjnnqCWsXmA/HQj6EsK3vvzujBAVFxEAq7yxWFTI+7iEvll9y80oJq4iv ZysTY256J0drtIawPa5a8F6kcPR7TPXMehhLVxB238Ms7guCJlxmB0vB96XsN0SD+rm0 pNE35y0ls4YAfO8+7M/z5WDUEbgLZSjbklp77Gw8yOrPh9V/m3vAYCyAcdbq3rEvnvv5 kTwwpP9IpCD+CRwtSy2fKsDCLdWBxWITFSVbx1oqIcgXo1FCKtIyT/SCG4P7v1XUkItk OcrA== 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=Jf0NXmPR/A6QkRkcChnZxvlRXMYJdAJ8WDWuNw+JSCc=; b=eR6Q/DvzwkQohvhYWjFNasEXYSCuHRfQERQG6EFSy+L78NLy2cbTCiLK/xxDI4gtLv 4e5+GH9xM6y5qT4gLHBY8tuiar4ND8jejm5wlH1E/tu7NZmrtV6eAJ/Ay12Nb27qrpfz XGIEa5dwpF9dXsuQZ98YQrYln1veYriNqW+7wCf2bufDCDKlEIsO1f66xzQN5eSCUyXh pQH7wyMnZVnHXIgwYIE5R9NnEfRSJhcdNdHqw5mmKe8qyMAVqONKbpOr/50urJhGWxI4 f0fbScV85Kh2UcMikftTEnJDu8bVY0eys0caw5VnMhy9CA152a0v8McQEZFxKY/kZJbN LIXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ui1Fd0lI; 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 kh6-20020a170903064600b001990a6daf9fsi1198136plb.535.2023.03.09.21.55.20; Thu, 09 Mar 2023 21:55:35 -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=Ui1Fd0lI; 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 S230085AbjCJFto (ORCPT + 99 others); Fri, 10 Mar 2023 00:49:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229948AbjCJFtU (ORCPT ); Fri, 10 Mar 2023 00:49:20 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2119.outbound.protection.outlook.com [40.107.117.119]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B21A9F9D3A; Thu, 9 Mar 2023 21:49:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AavFzUp+nIqkZvNuKbj2r6MjLa46RzHA2TsqnR+1XqyUABHqMmaZjcTM1Sveo50e3DkeZHmNcoRYA1M8dY0/fJH+1TNfbw3drh0rIAs1Z3LB3HGSrX6rlRELuqY2xqgx2HBLOwKa7eDLssxAkq4sxw2tMMeDW1YGEbZ6DBPFsjgZTLFaOw6OPevIkFVbjg0xONkpFPyvxR7CJhF0qs8Gri9BhvpcUUCOpXm8KNn6qVeWGB28RarBW8wzGwM07TCcgIrCaEjVigAQRhqyep3MqYo03PwH5WX32Li/zciwN24ac2jHSK4g54Y8vyqvVWtZRR35dKoJFTpUo6SB0JKu4Q== 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=Jf0NXmPR/A6QkRkcChnZxvlRXMYJdAJ8WDWuNw+JSCc=; b=ASp3j4xCnVKn6rlJmeIHszVQ0MN43voN58DsaVhNNn+lHCG96xdvXnMjIwsSxEGAGiihWkCilBZZNcODkG6hBNg3cONeuHWpaDOgTwYE2HY8s8A9QsU2OQFdYVa/kJEakRZn/Yx0QSyEb5kufk6Tkf5nuMSUwv/3YUrYc7CIf7Ynyv86mmxRXcgvTBRBbHc2lHCqxDj8cIRTYhRhrpLHk+2Ykjs1pyvJuJzhAGbG9RmWLe4YJTbw7yaLK3sKmp7V0Ls2aTn9rwqoU6EqFsFhMF4ZcWAyP+2orLvqInQou1Hep5z6A+DD0LWby6+zhaZGWVM6i/qAZacTZvxzgjbD6g== 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=Jf0NXmPR/A6QkRkcChnZxvlRXMYJdAJ8WDWuNw+JSCc=; b=Ui1Fd0lIj8aTyHTIyyEEwsj/07yvxB5AZTwpOcNERLpqaaV4vCga/k+KdNoko+HW5/KhrD0lC0gz63DySKzKLVJqH8hosqN6G25PNhYDbpWNLuadpdOMbEVNsiiAmc5XHs88+53iGeUmfXx3AGPiJjnWSSD+SRjlAy7T6l6v+zT4+eZu8l5bmstmg1jStHwm3hXVditPeQJDHYhxNY+1f3vm8JTo1RXeY2Fp20AyYJtlpHTVYeMgnFAvU2AJq1D/VbqLYPS+AvgXC4h3iL6US6nGzZV/rHR0UKLuZf0pow58Prkx9U1cC4x40WXb1fsMAlOicBQ9lHgXMwq91sbRrQ== 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 TYZPR06MB6023.apcprd06.prod.outlook.com (2603:1096:400:341::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Fri, 10 Mar 2023 05:49:17 +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; Fri, 10 Mar 2023 05:49:17 +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 v4 4/5] ocfs2: convert to use i_blockmask() Date: Fri, 10 Mar 2023 13:48:28 +0800 Message-Id: <20230310054829.4241-4-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: 711f6969-e97f-406d-ad7b-08db212b2fa8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xqbFJAQdmbHdWPhF3vfFZyWdBFBAKXTfjT6gH4vIZr6t5PQH0TpVRMOSbJcEbHGABSmslD5ZBlO2LAhbBLVhuCAoW6fLBWNpL6oaaPd3bN4bbS8RsEsKyMgfIv3M9ZcNKQsOSEfUoLNoumwXpjatuT8Lrs50Sv0fEEkV1yQdMKTWiHc/bLTlmIbPMxVKa59ujtN85GutND5MWCQEOT4SsFvvFfei2eKkY6nwpwMMIx1LtlXRAu1yDLGcqouDO6MRZmRtJysVbP1dEzmjUED61nSnbs8bWK0zgMMm8Cmk78T6UMq/G0ckBsZpUVZKwUir2oLRSfDGIF732g8ad0SmocNJ1Tv8MOHuc1zxq2WtN/zv68wLFaf3xQPlR1xw77VU95ds2sYh9aQzqKE9kvo3Kinqg/dohrf/LEOi42ge1NFox/WlqrXA6keAZi/AvrYgOWODFlzwcFMzXr7DWkGiOOojPpY2AdA9qJlYc4mJgSG7W/9H8tlHKzqbLu7hZm7V2hFgzjH6zWIsZXvwN2hlMCkRZ5m05hhg+SRDaVsBXW48NAlveyOWcuk5TB4PebP6Rif22m+G+IuqMGdOVacnCTX+L9nHZQsi8GJU5aUlI6M0s14gPzlcAP5Ul97L5s8K8jGZYFbjU6HnWy3V5N19Tb7Ey6e2Gfepj7J6IPGP5eDXUg9BUB1Lrd0mkPExX5yP4uvmDTV7XgQZBynR/CZ3qWT/Qs52LxxW5moWuuuJFJ4= 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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6666004)(6512007)(107886003)(186003)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dmrTeRSbA5k/Xj/W5NeL1fjGQXm8oyg0+YcTsyotISkdrDHOAB0w0Gf8TQtn+lMy1upUl/8depZTc8mrABlrtVIRUxez9JJvGZIWu0GQF+k7VYkJ4xlWURceeOCJovN2Cs6ybWwp+WrpiwbQS+U+01Xyc7XMAdNq2zhNEzmRJHQ63AKV+X+cH2mE+IjRnEOEVe82AoGls5H3jmU25/5e/IH7AL94rOhHv7fITGYE00UKT4Gd7RKE0TYEwG4eQVNMANQFlIWgft8zLrzvOhCs8Xm7fCZftYWlPp5rdjZ7eRNxyOEFwGQotteNGWKfOOiahf9lRZA/T5bX5H7cpCOeGRicTpGuUqGoE/jcv9A/7vIQ6qMy7W9k3XH8WRw3Xi+XXmOUEJh+vr1/d9sjOyy8mc9nKs9AcXFypv8xPDuTPHPK2RqZeqG7D83254IUNVZIfufoFDX63pQXGAj1vNo2g0P4HbMXQzErMfKDXFaIxUsl0htGHDhns1j4WWw37dCfLbP8kgdPaDTKnNnk36lSdutX1FZyec60TZgw/GDxXVlLg5pm5GNbWwq82YLy428S/RzX0AlpelWWpUnrKROg90s3fLR1ACXl64SWyeq0BWmgu3eZzifwaY4r8rwcdCEgw5fg8pTxw0vMrNNAZn5QeD0r66rK784Djne3tyeZ45IwhWPsnXnpB8a/pBje7Yd7xq84t6mDfy8Bfeu14FY4OyB4MvSMW26wttS5EEdS10i4zPcv4Vl3wJ1x0v4mRpdObvaoWRtCGD/EL+m0vOZFtBHS3AQTE8CwNy9bxSvBTgO26hs0a+otIR577lxMl4IfGW8K79FC67UliUF/nKi20mvR6RVXbfSYz5Ctd36h12hUidyH/Lvlx/vyoNymKvs+HypmPPQN5g3qnPHc/uDBWg69XcXfWBULY7YVXVulRddT1Lwm+SxL2VHKpFea7/YG3wcgb1aw+JfuiW0o8Qv1+J45JF0sJxc++X0x28VBgu0PiN5/C4oKP/CUgzKUTEZVF7i6/6IoAxpMpnoCIOxMYUrbwtf2bmtMe462YFe2HC/4x1xvMbSx2ka4xPeVFpbxV8wGJIYX65A2VVPVtATxnAacHPpsU93FvzS91qx/3axkecvmSLZiY4xFbNFDcy1u5Ww2jeWnIUH21CG8m7FN8sb4MgX7y/wMpQjfkmcgtvQPxpZ79bufpzPMR0ib/1k2ec7vxXAzr8C3siPtRrUFwIu+UN+de9xAwnPIMTAHrxwKSw3Xknnyr2v8SSZKUz/5hRGN3xuFkjXm1uAn+qxoOQ4LBoz2a6KjUIoXjEBTvlQhQuhhn8f3/V7GoP4XNz3YWZHc2dsSVoc6SF+vVoODEZFpCFtQWwkR3yW4VWPN2DXkcTXZv2tuxdPbXlpbRmAlmUjf9eAnGNlTNmcFBtKvYyduMFMwMjkHTMcAfbY54mngO0kecn3Gr7HaJhM6AJ25T/zg6hmYz48MMyIKe/meEfm313Wu7pG33krISktsQ4QLN3379CbeJb+NLzyiHrdjgWTwGZ3eNaRThDPdmcne1rQIPxKz2AOkdbmIMUdv8FnXPziIIdAMyr8/oS1+YwOh X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 711f6969-e97f-406d-ad7b-08db212b2fa8 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:17.1994 (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: 2MhJP/TVakp22HmT7xiQqB8u3NGWSEmzp61q3tg3wd+upwIzOd45eoqYpNGisZd1RLmmBp1M6djG3cH5tmUCyw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759959040205675436?= X-GMAIL-MSGID: =?utf-8?q?1759959040205675436?= Use i_blockmask() to simplify code. BTW convert ocfs2_is_io_unaligned to return bool type and the fact that the value will be the same (i.e. that ->i_blkbits is never changed by ocfs2). Signed-off-by: Yangtao Li --- fs/ocfs2/file.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index efb09de4343d..7fd06a4d27d4 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2159,14 +2159,9 @@ int ocfs2_check_range_for_refcount(struct inode *inode, loff_t pos, return ret; } -static int ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos) +static bool ocfs2_is_io_unaligned(struct inode *inode, size_t count, loff_t pos) { - int blockmask = inode->i_sb->s_blocksize - 1; - loff_t final_size = pos + count; - - if ((pos & blockmask) || (final_size & blockmask)) - return 1; - return 0; + return ((pos | count) & i_blockmask(inode)) != 0; } static int ocfs2_inode_lock_for_extent_tree(struct inode *inode, From patchwork Fri Mar 10 05:48:29 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: 67227 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp703688wrd; Thu, 9 Mar 2023 21:56:36 -0800 (PST) X-Google-Smtp-Source: AK7set9biLbdPoYqMmcApR09lso45GGz/ibbO6YKKctCnW2t31Erkc+5lEEDw0ZG6HEjeObXT8Tw X-Received: by 2002:a05:6a20:729b:b0:cd:1ccf:246f with SMTP id o27-20020a056a20729b00b000cd1ccf246fmr28403228pzk.34.1678427796660; Thu, 09 Mar 2023 21:56:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678427796; cv=pass; d=google.com; s=arc-20160816; b=dt8WWP28pJyC2JncedFtzxd3rr2BJaE74gup4zi0COO4aQAXTPN7RXS/ju25VGp3WP oene4ZO+ATBCiu84AKlX1ltotR1iPjSxizFQJZf0SgNkFJJGBhuk6DRuLENy08dlOVBa A2I8CHKWGkSboeRjEpP3cx9KQTf8vMdEa7YvE0sqrTLdAlNQ9J8PUBiZ702YFOCfbCf7 ybu3fc1auZ4mHCG01kUS2hqNKiCsb5UBTL0+qRHIQ/Qk+rUWlE98SGwt308aNouh4qUG SNFmReUHl4whRBnqPR4o0NskOYizgMFqamNGhYyDhoVmyxbe06368vGcGxiyqXBHr50b EHRw== 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=jGyFWvLSoU+2mZB6+yv46/cKOs/G2aGN6o/I+8yE17w=; b=Hreot6EIYbOnzPTrd2m1cuzWxpFtLItKrhxO5KSr2nLrqGk2tWLvVnDWkgfJVzYuaG /VO7xya6DSECQLbtbI+MNA3kotFN8qi9REXEaiuHNZCdgU2MtRWMO+LsYWMDkW6q4Dw8 U3EP1GlYP4Q0dxAyOaCV+95GvbUeZhrsRwZTqBvJr2BNrA6zK7bOyqJxACVygaEC5Yju cYWkvEuSWo+ukcRu0aoxP0tWNi6zp1vt/NOfRtjw13lER3AVuICLAkI4pv++DZt3WhNj 6Yrk07qqx3HfSEBeASKd6Y0F8rfSd2jJ/3RJtEpcEzbiyaUxtg2en0oL9+3h+V4EyNZP tQbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=WhrOhDUk; 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 r11-20020aa7988b000000b005a8ad6d343csi1100840pfl.126.2023.03.09.21.56.18; Thu, 09 Mar 2023 21:56:36 -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=WhrOhDUk; 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 S230101AbjCJFtt (ORCPT + 99 others); Fri, 10 Mar 2023 00:49:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229968AbjCJFt1 (ORCPT ); Fri, 10 Mar 2023 00:49:27 -0500 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2113.outbound.protection.outlook.com [40.107.117.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 940A1F9D23; Thu, 9 Mar 2023 21:49:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FdkFNY/XYJcKghRY2azMNhTzYFWzHSnzaFIsNdTFBLQQhzJN9tjuc+F/fWDe+wh48KlSh8Uls++QqToEf50fqKjb4pSg/Ul23a5beNxD1WCifaf6MiFZ5j9dNeS7AzjESg0EquEBCranCbxArNWoD789hD+Z5zznHsNhub4PfNvRiqDhrSzvvsD/A9OKumgOi4356HsojUyx3cenhDu4uDXj/+YBI3dmtss2C5I8YOr5U4l9fNgPaQqM2Q8Mhb2HsQIPH/4LZFa837lY0Oo4s3kyhRSn7nCQx74wKK97mYKis+l69gdCCdOOB0e8QFp75gMG8NL0g7B6PNij9fumFA== 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=jGyFWvLSoU+2mZB6+yv46/cKOs/G2aGN6o/I+8yE17w=; b=iGtqgDrMzl7O5m0Xexe/kTTUISrfCitBINU1t6ojl1pVsA9m19HVFofo19+kmTzo0ZRgN/bSNGTbNOPRhORddOFHiQgMUERJtkOrVJ62Klahy/8g3RAu9+manGj3cZfW0ZvhKpiVELA0Emlma+H1993AZbPFbPKiLIDr0+IUbcsxRs7fvswp3fp0VjKSxjgLY+PHvj8k3HMDD1mv4y3+2ErQ+J8w23p2cRdM05EJiQSnSPN3XWqM//RfgVE9gmnAHSDWXiv8V5302kyhL2Mc4b62Q34bFKKwvxnUwvYqmPXvBHnhkeoWIVpUMkbV0xBcCSo4j6OARzkj+APzx8jowA== 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=jGyFWvLSoU+2mZB6+yv46/cKOs/G2aGN6o/I+8yE17w=; b=WhrOhDUkEGXz0eez4sWpsC9X6VH7uZoLmOWJeQwPPNCTq8oM86Kkx1UAfiLd8HRsTanJNDiX5kdyICwkZW023WcDZhFYsNcrfBuSkayjJdVEWfIsbc03JsUFgZttCToOzDGNlQIFAGcTcmfak/SjulitZVfAJB6ytjLS6OHvxoBPqsaFZ56HHiySR4qjSbQD5uT2DlBkG8+JfZOVY8TfKSmQHMoxVUWyEJpttT9P/lStNXxwJwJyXBcPZWs1Ut6FPPCRtRQZeg/y5lhELEshdf0sQvsrMGXxJN5ccWuOxSocHvrVgzdD//rg7hcreBNaUPH1wTcdrnivxenTWjBsLQ== 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 TYZPR06MB6023.apcprd06.prod.outlook.com (2603:1096:400:341::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Fri, 10 Mar 2023 05:49:20 +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; Fri, 10 Mar 2023 05:49:20 +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 v4 5/5] fs/remap_range: convert to use i_blockmask() Date: Fri, 10 Mar 2023 13:48:29 +0800 Message-Id: <20230310054829.4241-5-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230310054829.4241-1-frank.li@vivo.com> References: <20230310054829.4241-1-frank.li@vivo.com> X-ClientProxiedBy: SI2PR04CA0006.apcprd04.prod.outlook.com (2603:1096:4:197::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6023:EE_ X-MS-Office365-Filtering-Correlation-Id: e5ebba1a-19b4-4abb-2515-08db212b31d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vmRIrTsdgNJOnv5mVw2IF7UBVhRCnXl+hUMJNlrvYSzjQ8VEi+it7z4kFy88i5XoTmTkRzfqiQUCXtTdHcnNN+qJ3JaJr7uL05YgA74UjsWH8BXCPlvfFtIo3o+CwXkdoU0P38ZVlBMOdTfiWNRRbcBSUCztVbfuQXUMmvy53tVzh9LNbkItLyqZwtEAE6RbA6PoBFLneqFw623EOMI4vs4ix75wapMVZLFc4RENEkzfB/0mtD+iR6HxD5Z8b3ttg1YVAjhHscjanrVGOSk61q0yCKGhDIkT6SyWF1pQ0W4zKURwWMF0dUJXhrhZQ1pDJNHFrbHPhsOVZH+ibj1BaU6IhtUp8pNmY5akE3byJJ6gVW29X5o4Mk42ENDBXWJU8p8uU7w25OguRk8J0owdS8JWgx++Lx6sQ9pRi43nIm9PXvIRgDR3cMb/4rK+hCJ4MLYBBf0WhvtTiRT+T+71xIj/KZ3GFME51Pkgg+f0d6B4QkYGXYhogTCyuwVZjbvjOImpfsBove6ppg2CzFcBOpV2wQpIMgcQSk48emJA+3Aw25YNeTIY5Q5YSq8n15xx2ep00q3fmRCPC5ZVZR+fxaoMTLWouzcBcPyeiHlPQUDG+RaSgOxCBA1fgOGVV9Qs68yaEddhSvEUTZE7b4CtVjqwXHiZx2KokXi9CsbEAF2EL4Au15MaAIjU/eSlUgfFVERcXs91ZEq6cXybLIREPyQzSZS83i5bog72qnGJbKY= 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)(346002)(376002)(39850400004)(136003)(396003)(366004)(451199018)(52116002)(6486002)(1076003)(26005)(6506007)(6512007)(107886003)(186003)(4744005)(41300700001)(66946007)(66476007)(66556008)(4326008)(8676002)(7416002)(8936002)(5660300002)(86362001)(2906002)(36756003)(316002)(478600001)(921005)(83380400001)(38100700002)(38350700002)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hyrA2BzWy4XVaNurQ1LelnavYpstiVxqkOiPaiSJzaJfaUWaJ+VOKhLol/qsCt0lEIcZo7RSdeMDO129jUnFTawpQmjaPB9A1Ec/QyvtjLBwHJcReinsNyH0F/AtgTMKk6la59HwJSFBI1TsmPeD/ywtO0y03+hQ65tYYtWLWMgpx49mXjdx6h5/ik1V14N6GT8tf6ys+V7MBKIWqkXUB6MQ1tSJA/T/g9sv32yJho5q5X8MPRuEjk2ZUsStBtw+v++dFlINpc5bfK8AMQkfeIwvJ2KDkdmbu5L26MV7FzU02iF7F8iER95h3+KHzfkSFN5dwYuXfA0rqBjUI2gMKQiUO/gHUt7rhdvOf3pPUgF+o4jXdQbyjOrfUGAMbwwbmdOZHFA4dfOYp1Dhg1hNerFWDG4iPuzGErBduIIWtxBKYkVbTqHcduxOOKG5L+kOsGGn4PHcAa7mOm3C9LBaqlvDDcDoKbDmIq3/jY98jNR+Q+koTg6V6UoTcLo4/gpuXwQSV2r90q1aV9pq3hPjdXNha1gZGFYUH8Fw4jwuVQb9+0vl8fCVVewbb/P4nLEhtn3x2cfRY3Gz92kTn5KeG7JmllHqO9CJ0XDplMMyAEJPpH4ynHhA7EFE30B+jxxr3gGVMkA7D5fZPajs1er+KrfcXyKWnYyeGigrRHtTMDXn7YSrCTxGDU+g6GBAoTFDsvJWUeeJc6+ORJdBGQDCeej2xNHDKsxLnWwFYZLNVp7BWhINKYN4hhDd3Xte8DJGxsdpVEPeeUY6lqqTKakcdoLf8wFfszRZCPabdM3Hd2OQxeqIxdFfQmVGaRiHedjxINp5IucQnpDGR6fbBmo4SW4HNO0j4/i4rnheCuF5qX13D8gXI19ORBWiujRq77io0vSw6JQ5CVZerBJTmp3+Uyx9grPZ1B3X6HvgIUUbcouVE91sQOG26wy5XPd1UYPD7Qsa58UDkjJbRVeUdFip2RXGH5f7EOI3pZALe/FXAp0nRaYBI/fEwD+4kkdNyBB+zfaY/bCsHD8c+GYwMNXqWmIAM5yJYx8dLPycjsHSpPveTszZHmukuLaDtVEm6bxEH60N/+t+DFh0aBtcZtlnZHEgpy/JToE6634duhobof//OLCugL1Pdwe2mszM685QfMcTk8TZwVIaeglDyeek444mNltYonV2o0Mkbn0u0fFB0e4GOHMGxMeBcTq0rtMCXEkvEcSVqLGoF5HSOXq//4CKecM6e6dnrftFdVnb2xbwpTOWZg02XBJEBAKjVB9b8qgcN/m/jAxILZ6e4mqq33r1xwV4WG6QesZbGHeogFWZ1axSGGo+h589W/DR4+pksC3EN+r4vppPS8+nwpRDuz/rdK17FkDcnT1Quz2wnWnOr6gwZf3ZWRFEOsdvwgyorsV5PXzjormopI4+WWfqBzHG20rCKF0oKA++6tCiBUpl8lRvdnLLRz2Ap96paB29XrjCoNuMflGYZVC2jtd2L3y9dvnAKi9xgF8lAW3QV/PZzq85nvMVJHJ/6Tr1lok1E3VXM9VE3d4QbahjIId1Bx73IocA4f7MxcJGIr6zLs07mds1rjDaithpXeE4V6Nb X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5ebba1a-19b4-4abb-2515-08db212b31d9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2023 05:49:20.8712 (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: QKizUUXD/PnoWJx1I+aESm8SLdwYYhBhPV69laPZaD6rM+/iSpNXIgeiSRn/DRUBnQh/W6cHvJhumEt8zADWdg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6023 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759959105550586726?= X-GMAIL-MSGID: =?utf-8?q?1759959105550586726?= Use i_blockmask() to simplify code. Signed-off-by: Yangtao Li --- fs/remap_range.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/remap_range.c b/fs/remap_range.c index 1331a890f2f2..7a524b620e7d 100644 --- a/fs/remap_range.c +++ b/fs/remap_range.c @@ -127,7 +127,7 @@ static int generic_remap_check_len(struct inode *inode_in, loff_t *len, unsigned int remap_flags) { - u64 blkmask = i_blocksize(inode_in) - 1; + u64 blkmask = i_blockmask(inode_in); loff_t new_len = *len; if ((*len & blkmask) == 0)