Thread (13 messages) 13 messages, 5 authors, 2023-06-29
STALE1094d

[PATCH 4/7] buffer: Convert to bdev_logical_block_mask()

From: Yangtao Li <frank.li@vivo.com>
Date: 2023-06-28 09:48:14
Also in: linux-block, linux-fsdevel, linux-xfs, lkml
Subsystem: filesystems (vfs and infrastructure), the rest · Maintainers: Alexander Viro, Christian Brauner, Linus Torvalds

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);
-- 
2.39.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help