From patchwork Thu Mar 9 15:21: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: 66939 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp353790wrd; Thu, 9 Mar 2023 07:29:50 -0800 (PST) X-Google-Smtp-Source: AK7set9NNc4c60RgDI/JOvP9h/ibYwEDAfJPAc5u611DK14liKZKIMkxb5nZFdUW8YrwCO4PWb4Z X-Received: by 2002:a05:6a20:2448:b0:cc:f47b:9a with SMTP id t8-20020a056a20244800b000ccf47b009amr24351251pzc.1.1678375790580; Thu, 09 Mar 2023 07:29:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678375790; cv=pass; d=google.com; s=arc-20160816; b=eNttdAIeN92pxN23ZdOjUwsHA731LmYjA7WjhXbm8Wl+RIJoe8RvVBqME0OB/T6QCt CNC1RpAQE+WhvpA8eYfQpF9ROisg3O8wsBi4qVkCF8ODrPP9hNcGK70FvBzB+iyofgMF HW1dxMfYgqmkz/c3vSh+TFegKeP/Rn1WoipfoGxRUutSzvJhblV1N7d+7FOwfJCafTKU wPSnViV5VpKxob2MWGWiAgfRHvGK7Sg8Ib227F2U3aX7LnStYY++yutLVvbFZyYMm0HM FQFFYfCENK3VRtOHIRG33gqz4pWBr5HM/107hEf8VUg7xXbxVSdH4tzjBVvvwTaV//EE UUXw== 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=UNpXuUOP73OF1wzP5BWE0AOxNX6TvbZG+htJ0owwhS+1KSVqaIfgJ8UM9Oe2a0ygK2 +uAmjif243IhjTEwblIy80mcFdhMLTl7KP8QvQaNTRPSZCa67C1HJ0jXrq4JCskvGZp2 Doh8yIEBlsZt08meEUD3xDlxpBNoHyqq+RhZH6ubysh4lUA8uIcqku9AQXIkY+MG+ZKE QXwDiUAXBZywSPzKEiZuiojwB7fW+HntN3zzVyqfJx+q9rA8Eq6eIbJmT9G+wDSXrVxM MQW9wyEHegqTdcv4UOlFnKJ9Cyh8vTKuLWoQw+ISa7VbQMEXd47FhZudoEd9iOL4OTJS oxHw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=gbsRCcHS; 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 z188-20020a6265c5000000b00593b8c172d8si16111388pfb.200.2023.03.09.07.29.36; Thu, 09 Mar 2023 07:29:50 -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=gbsRCcHS; 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 S231638AbjCIPXH (ORCPT + 99 others); Thu, 9 Mar 2023 10:23:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231354AbjCIPW1 (ORCPT ); Thu, 9 Mar 2023 10:22:27 -0500 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2128.outbound.protection.outlook.com [40.107.255.128]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3055F05E4; Thu, 9 Mar 2023 07:22:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YhPrJ2u7MfwiDhatX2Gt+Hjw2dVwWlqbbSjceE5z+NvV/ugRufrhTqGx3L0aHZ/MOB8fjs1Uqr162mUwNaG8H+LH3u27yL5R8Kt/mR+o17u88cZ+/Y2hS4j6s7D777B73IeGGn6jtSfIV4d3eNL7SPQiby7H7rypxfv+Z62V7mdIWkWzWHsrukyViP5MTHnkSIngFbN8f6F2SbQL9uRj9w66FqAExV9FowPNqIh9PFStioAYRCs4IvoH6CXNGIgS3iAA9aMefxDVW6qeFDCb5BoZkG/Nfec2mEI4T9RWGgV0lU709CqYu5LVdS4yZutMGLyqRKwt3CnnGDBtDbs5xA== 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=oMH8TD1bangGMdN1R/mOeBSkFZrGddk+b47R44yo7kSaSqJS0W9xs0lfUsgAquOXqJBt8DPs3qKW3K6cBMoCb1LgKOldon9sfPf9waY1kL0W4sm5vvtPUg5tGxCzbl5vIz75ccvyhSz8e2M12twg/o+I7Ic78G86MYN7rHefKiv9YhOeJOgg8Z5LBqkjvhk6FeD9oUnjQFNtTOaizPP3u7I26F6+TZKWfqgY4nMdO3fjrddFwZ6diEAoR85sANsZTaMxne1uv6tyql1Mq/uc68+P/eNkzpjQQbWAFT7SBuYD3AveU4pZNkdYkd4QugJtfPxG1YjqrjnuagebzTMTyA== 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=gbsRCcHS67RA3jsVpo98DqoQo+E1rTaJiWplWrETQ9aI3zbSB0Bgb0jZ5sngjknsZCCR8dYmtWuvUv9jdcijDHQzNxdSYl2Uh70O25U5cD0EvPKwO3RdaygU5WmoEcqVaygXmqULDL+W6JQIwRPy6X0n9o5bPQZ+bG1S3tzNrsrXNaSoe5fxmWlvlZIeOEfMnTEt5jqLQVM9/WsLExc4/Qbi2gkR5t+446MZ5F6A1erzJnZC9torbra/6uEZjYJ9MfeS9CVniBWNftTIUO9Bs902yt4eQdSZrtJ6KyK5joATbc8QSeGa0nPpe6+CTXwWO3nd1MYd/4vACJ8B79SqVg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SI2PR06MB4073.apcprd06.prod.outlook.com (2603:1096:4:f5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Thu, 9 Mar 2023 15:22:23 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::daf6:5ebb:a93f:1869%9]) with mapi id 15.20.6178.019; Thu, 9 Mar 2023 15:22:23 +0000 From: Yangtao Li To: xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com, tytso@mit.edu, adilger.kernel@dilger.ca, rpeterso@redhat.com, agruenba@redhat.com, mark@fasheh.com, jlbec@evilplan.org, joseph.qi@linux.alibaba.com, viro@zeniv.linux.org.uk, brauner@kernel.org Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, linux-fsdevel@vger.kernel.org, Yangtao Li Subject: [PATCH v3 6/6] fs/remap_range: convert to use i_blockmask() Date: Thu, 9 Mar 2023 23:21:27 +0800 Message-Id: <20230309152127.41427-6-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230309152127.41427-1-frank.li@vivo.com> References: <20230309152127.41427-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR04CA0168.apcprd04.prod.outlook.com (2603:1096:4::30) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SI2PR06MB4073:EE_ X-MS-Office365-Filtering-Correlation-Id: c0c74165-0494-4652-fce9-08db20b21502 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MRTfHU0Gm1HEODi3Ljfa6O9bH5g3gFJJw2IY9HPW3uhYS8xluRXK3a23y8m8IgGpmWxwOXO8E8KLYy+VPoBInNSZizmgycC1HobhuNxh6HiJx5AMMOoIulhfFQAWAFzjndOrHSp8c9vSSMNolIjb367EG0oMFWN0HYDIEfK1BQurQlaRZHJV3vNpVTSLkOSJZRQEyAFDQ6oHwbuZI1t2AeP15GDf5O2ynq7sDEdpI9NqjL3KLPVTuaqNjK9DIV5I5LC/oymeUMsaxjyVYWHSPSXk2WEGSKQ38258mo0rbm/D7AVn8ndkoIs40FByzSU0RZSZf9yTD6rR0oe7XDdndhCoaJKgu4lZYY1vOl97vPr1GgwedDE9/H8A/RQe6Lio38lolz8WtPT1ZEQZzcowBk/GChGIRrX7gKtGUYM51W0mCSL/i3vdI4jB1+4BEVHfGTkOBs5wrtiO/y9RA5B3Nd4tWWAhKXaTRVuZZNtU0iIwFCwlI8OAIF09P9oxuwZTmiFGcJ5WF0l3zSJKtr8z64jtQYwXmjWeS3uUX6Hpi64W5B/rQFW5G7sRk67qcSTRUenxnJQ6LKIrh+tcvfGaUQqK8c1uLGtOA9YMNEx+uCv9GxnfF20XPUpHYE16U0mXC0itvE24Kr4CR0PACS7VAgPYyBC/pnpb2l9zl1Z8I86NpwOBRmz9+ZkR76uDHqbjUm7Z0Uyr2LZnmBSguI8CukAaXN5HBOjNXq+b4qhB42Y= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(136003)(396003)(376002)(346002)(39860400002)(451199018)(316002)(36756003)(921005)(86362001)(38350700002)(38100700002)(1076003)(6506007)(26005)(107886003)(6512007)(83380400001)(186003)(2616005)(8936002)(5660300002)(6486002)(478600001)(7416002)(52116002)(41300700001)(4744005)(66946007)(2906002)(66556008)(8676002)(4326008)(66476007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: VRV+D8aIKWmOGzclNTNYDfgBdfCsAsuBCvKpSVpY4ZJpFbS2WGAP3XmgSIV8g/ZEryBB9wvUAryFpE/cFw79cv/TZkRBhp+VJ4A0li7G1wrv4fTIDlmnx/StbbruLtiD0yubpbSI6fepTXEVkBgW8Upl0ugu1Jnfj1l63dkPnlzRdJRr/lkYM9KSZixEezHDYjQR76WxaKvoJqLLEZMtrewb7gJwKLV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8vjf05D+SFDzI/SZotye/Vw55JMVTl9FUUJ/5KJrJJCl3MK4HA5WPbRboWy3oiMNgRok2YfCc6eqpYeSWwULgrImjiaPqHc9sN48rVME6aTQvbNcC2QmCDm20j7ZOjDrjzaFcTrFLBuHuuWwShq4s7bmbGn7NbsqO/RRwAKr/FBBXojj4BuYH7HRtcfobHkefrf0T4NODyzQVxlDJtiqS84ymvXKHVag4LBTuZukjiCevVx/NkjP1xoHu5Ng2KP/purCpeuOBSDqha2Vohb96UInTivnktiMxiGg4kdvj9zWJC49ddJeXAquSur X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0c74165-0494-4652-fce9-08db20b21502 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 15:22:23.4185 (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: nwLsINpxtBm3ouemSErTJcMc5WkWVEC2EPQ7vFF10iaOcViQfcsG/LK6F48BJHDGgzO1bs6r1O7WX1uk5r9g4Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4073 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759904572584827505?= X-GMAIL-MSGID: =?utf-8?q?1759904572584827505?= 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)