[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230628093500.68779-4-frank.li@vivo.com>
Date: Wed, 28 Jun 2023 17:34:57 +0800
From: Yangtao Li <frank.li@...o.com>
To: axboe@...nel.dk, song@...nel.org, viro@...iv.linux.org.uk,
brauner@...nel.org, xiang@...nel.org, chao@...nel.org,
huyue2@...lpad.com, jefflexu@...ux.alibaba.com, hch@...radead.org,
djwong@...nel.org
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-erofs@...ts.ozlabs.org, linux-xfs@...r.kernel.org,
Yangtao Li <frank.li@...o.com>
Subject: [PATCH 4/7] buffer: Convert to bdev_logical_block_mask()
Use bdev_logical_block_mask() to simplify code.
Signed-off-by: Yangtao Li <frank.li@...o.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);
--
2.39.0
Powered by blists - more mailing lists