Message ID | 20230628093500.68779-4-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp8805763vqr; Wed, 28 Jun 2023 03:08:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7eHb+RCI4fEl4mceVIsRDp0CkJWqCzWEwiud42oNCT5VHnJJt5frihTYVFF+790umSvXM4 X-Received: by 2002:a17:902:d489:b0:1b7:e49f:d with SMTP id c9-20020a170902d48900b001b7e49f000dmr13462355plg.28.1687946929579; Wed, 28 Jun 2023 03:08:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1687946929; cv=pass; d=google.com; s=arc-20160816; b=n/85GRqcvOzR6Q8WYg7Tzajx/eQCD7FbMB4PEAZsd/2rHNrSDr4gpgJufae95joY3S b26DhfEht31T8TSNJrKd3EP70nqQ6wge9nPFwVA7bzziTENuniIs45nIjUOu3aMqrHcU A+QguNqUeCLo7ZKFqTtuciKmavoevlCCfdqsxF1TBpKY5DJ0YINsSEWRxwc5eNCGcqag A7TbOupwzsOADp67XJv2ZiablGnRS+MLpwxMzM2OnVvtZH42ecmVFXxdl5rX0X9GDlhJ ytfKVZ00EABxEcysRKdQlNg5jbFgJ6PkJlO814X/DdoO687RDdRVc01OPMMzAjUjOsbi MVTA== 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=/wkj8xNo0+zs83L68WDjAFXJ8Wv4XjEBJ8XBECZe66s=; fh=xqK608XVEI/qdjr/e80ya8yupN75wOPt0gzvnrTRgaA=; b=Bcm4ZBwPUUOzh2UFYel/BsD3010PjzzhS3pu5QZdTV8haRIc3L+Ps8IIB8nMaSi64h eIZ+OFAzAF4iK0Z0flj8fq3NLXz0v26eZmxKQunmj1OvDZ+UNE42Be8lz59GiaNCOsIN eE3cq158lD8+94bzaBtjFdEyPjPjr5wkW1lIXqj3+AT4k5xI69HDWMVn3SOteY5hO2v2 LJ2plRJpML2WyWEpRs29xFYdVrKjx9a4xpku+C73IQyd5zN3dJ0VwFezB7qG5JGK+vnz tRRQYHAbhcsG9Occac77uDXmTDtIUmQ1sXAT0BsvSwy9ejrqeO7MsB+sN/t7S6MvAWG+ ORlw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZpxPVAXR; 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 f11-20020a170902f38b00b001b7e6528c77si7545491ple.144.2023.06.28.03.08.36; Wed, 28 Jun 2023 03:08:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=ZpxPVAXR; 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 S232310AbjF1Jwb (ORCPT <rfc822;adanhawthorn@gmail.com> + 99 others); Wed, 28 Jun 2023 05:52:31 -0400 Received: from mail-sgaapc01on2133.outbound.protection.outlook.com ([40.107.215.133]:11872 "EHLO APC01-SG2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235873AbjF1Jgk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 28 Jun 2023 05:36:40 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LwtAFrZzc76Kwz/zjT3x/ke4LMCMq2H2zyDvFQHP7ww2GPgL+vKVWAQX+dbtZ3H+M8G8pXSJR/CfFk3DLZD+DumRHh+bK89P1Pd8nn64Z4jZ8252kclmb8QOAePggBsUgNGXe9KjGm6e5uQ07hrxqywFsm76f/gZVYnV+ZhQkmDBcbm7xqcjUjK++f0pJEfLDN5n1Pbhi3QiXC4dMsP4EYwPBC01GBAvK9/qQ9EUmHeT8tn4n/lHMlYLvy8kaF52YSH+un0wN+t0fcNAZ71fbecWPUF2d9n6/qaoM3HNu7NYf/mOsgS8ymNanSmqnQsKfXbKjgVvG+QfLo+e6iEdUQ== 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=/wkj8xNo0+zs83L68WDjAFXJ8Wv4XjEBJ8XBECZe66s=; b=bT01KhzX4UO9cd3emsWzIDYiVO0iqS24smfk9HEyMrde+CcVXuo/aFcJPwX+d684rdvCyjxBgIMZn3s7j+2mwB4mT/8zVe2YayWW31x6FcNXYSBN0ZdFwdV/+VkHir0+cuhHuip0H7jOrZhZdTnk81M8o1bXLfbl863+vbsqZvxp2/qrItz0D019F02jAX682KBFre27EG+KpBgulzdyUvBpQxNGjJN+fmUyqC21r5It39oGuHfxNL+sV3by+XAaSHXY01QdzICE3sVfBwe8kT2D1cGS8FzhYC0pwC3uFY96l7nhukZLFo1ga8XIfHpmgDEvIKtDA7c/KwaOUqvjhw== 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=/wkj8xNo0+zs83L68WDjAFXJ8Wv4XjEBJ8XBECZe66s=; b=ZpxPVAXRd9KbvjmyvxIBRANTQpFo2RN+M6l2Ite0/lH3/7FR/A+F5W9kP7/3R3K6NHmBhe9pH95mvY3D0v4oM9mZPKXhrCA82pdnxS/JPeh6W+aMW8z07yufrz/9h+sVcSIBzFhFuBcsHJES/T60F7di8t6zeEJlyAXAjDGw6NT698Bb10GDvHXCLpHE9UIeVwJFnbucw6VdAAQQJYHWHnR2aGEHWz4hqo0Cm6kemuC7lCq/X9nWoXyzIGVzgHcAxBSDwRfd8Sj2MwAHT4/PcKCjMUEztLmV0PZiNAUtSKCa77NUu1PZfHgFKPOolU09JhFj9mkckVuPR1I9w8LxZg== 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 TYZPR06MB6144.apcprd06.prod.outlook.com (2603:1096:400:341::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Wed, 28 Jun 2023 09:35:27 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6521.023; Wed, 28 Jun 2023 09:35:27 +0000 From: Yangtao Li <frank.li@vivo.com> To: axboe@kernel.dk, song@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, xiang@kernel.org, chao@kernel.org, huyue2@coolpad.com, jefflexu@linux.alibaba.com, hch@infradead.org, djwong@kernel.org Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-xfs@vger.kernel.org, Yangtao Li <frank.li@vivo.com> Subject: [PATCH 4/7] buffer: Convert to bdev_logical_block_mask() Date: Wed, 28 Jun 2023 17:34:57 +0800 Message-Id: <20230628093500.68779-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230628093500.68779-1-frank.li@vivo.com> References: <20230628093500.68779-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR04CA0004.apcprd04.prod.outlook.com (2603:1096:4:197::22) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB6144:EE_ X-MS-Office365-Filtering-Correlation-Id: ad21436a-a05b-48f0-39a2-08db77bb0152 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /YmnjOmc/PZCBmVPMSA50k1YMnct/HnfZ/UkiP95crG72+t2IMAuMaR4UO1SEKKapZb4tJM2iN2HUz2lpnLv0FH3+3/VRnwJueCAvjgbYaBBYhNgkN3D77ULU/4QsjhqhjdPUyp6+c2SnKcPVTdNFmmCgbkozcOG0l0MGBe4fgcxA4PPpnofsaJrVzsIiwJecRq2ju6qaqMDo6zkFpULoRKzxzfSMuzpv67TUKSJ4mFYFmwd+rrsaB73ovpkppyEDasjJkxYNrSsEWierzZvOFMtcoag5e9OaSy0nv9PVFheX04Tjh9V5I9O60GqaxIKBC3/qhRTY3lfwGu9V9nKe8U7iGYVCKfbMfXVvhZMnrO3dvuSRAdGzrh6IGnBAH/paaqIss8TCDaRGYYUa0RRu7cC8MC2oxGu4qYHWcCmQWkX7XiJuZN3CmRGTc5u2Orts/qf9BbVTeuE8L1l5MVhSOv8BDAWJUDGOH7z+zd7JF/N+oukfdxdwi3hkT0sSyX6pK/tAPVtAjRyC6ed96O8QiTMMI+0N753+E7bflYxlloYMtLdUTQX+bIxNRjgV8SoUKtRz84ax5RuEaOnHVDJgmp5DWXXbLDrydqrWbc9MxznfVL1LgQMS+AxwX94r3ZB1pTAiXjzrKKdi0WPuOjjSQ== 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:(13230028)(4636009)(396003)(346002)(39850400004)(376002)(366004)(136003)(451199021)(1076003)(6506007)(7416002)(5660300002)(66556008)(316002)(66946007)(36756003)(478600001)(4326008)(66476007)(8676002)(8936002)(86362001)(4744005)(2906002)(6512007)(26005)(41300700001)(6666004)(6486002)(52116002)(186003)(107886003)(38350700002)(38100700002)(921005)(2616005)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 67LmwitXJys7m24x6TBfrG/aTRgyrxIzKU32K1YwacYxLn7efBBdkqlrmPvxzeAMvgn2WMZ4cYe8kNEQhe7UzTD1Z+BrCqRJyLqGg22+5oN0RwvNHpidOfAq5RE0yzsRCOjtBz+cKi09F0hrz1bMvwRYVACfRQZ6xVoh2NcV+stBuOjuVj0cSXPJZzz5Kwv/xTUtcl3LcoZEHLG7WoBdAJ1uVHaLfy7ICOPe8v8six7WZmF+4RvRJj42zotlGh8zWA4aJpfAXrtLgmoKNdE/IeEsQzvBmcMN83SL1t9Xd9AKUcHUg/elPDtiqupRJVGxytMQfbIcTHNvgLR+3QZ94+T0mMgJBJI5OpKBJwxEp6thAu2qLymDcvfWBw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TjojDkEzLoXx1wXcY5LstL0BxYiB1C+8/XX9yiu2xCtItggi3IIVoGbOI8SNjkuGOXHEiN4IjO+8xwOkQR2Tjmb91C3ThHYaW8wn+I5iZ1BTVe/6JsZ5ii5o6QQ+tVdV8DI5lFWY4/Hq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad21436a-a05b-48f0-39a2-08db77bb0152 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2023 09:35:26.9921 (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: 7q2dALsHz4D/2FCng2DqCwpWJtTNbDjKL8KP1Ml83WvhperSYxRjV0FVDcZmn8aNvltGlzMwH+zV2VWUqY2asA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB6144 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769940639209991958?= X-GMAIL-MSGID: =?utf-8?q?1769940639209991958?= |
Series |
[1/7] block: add queue_logical_block_mask() and bdev_logical_block_mask()
|
|
Commit Message
李扬韬
June 28, 2023, 9:34 a.m. UTC
Use bdev_logical_block_mask() to simplify code.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c index bd091329026c..fd2705465a5e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1128,7 +1128,7 @@ __getblk_slow(struct block_device *bdev, sector_t block, unsigned size, gfp_t gfp) { /* Size must be multiple of hard sectorsize */ - if (unlikely(size & (bdev_logical_block_size(bdev)-1) || + if (unlikely(size & bdev_logical_block_mask(bdev) || (size < 512 || size > PAGE_SIZE))) { printk(KERN_ERR "getblk(): invalid block size %d requested\n", size);