From 6ae58121126dcf8efcc2611f216a36a5e50b8ad9 Mon Sep 17 00:00:00 2001
From: Pankaj Raghav
Date: Wed, 18 Jun 2025 09:58:21 +0200
Subject: [PATCH] fs/buffer: remove comment about hard sectorsize
Commit e1defc4ff0cf ("block: Do away with the notion of hardsect_size")
changed hardsect_size to logical block size. The comment on top still
says hardsect_size.
Remove the comment as the code is pretty clear. While we are at it,
format the relevant code.
Reviewed-by: "Martin K. Petersen"
Signed-off-by: Pankaj Raghav
Link: https://lore.kernel.org/20250618075821.111459-1-p.raghav@samsung.com
Reviewed-by: Daniel Gomez
Signed-off-by: Christian Brauner
---
fs/buffer.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 8cf4a1dc481eb..a14d281c6a746 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1122,9 +1122,8 @@ __getblk_slow(struct block_device *bdev, sector_t block,
{
bool blocking = gfpflags_allow_blocking(gfp);
- /* Size must be multiple of hard sectorsize */
- if (unlikely(size & (bdev_logical_block_size(bdev)-1) ||
- (size < 512 || size > PAGE_SIZE))) {
+ if (unlikely(size & (bdev_logical_block_size(bdev) - 1) ||
+ (size < 512 || size > PAGE_SIZE))) {
printk(KERN_ERR "getblk(): invalid block size %d requested\n",
size);
printk(KERN_ERR "logical block size: %d\n",
--
2.47.2