Thread (5 messages) 5 messages, 3 authors, 2025-08-29

Re: [PATCH v1 15/36] fs: hugetlbfs: remove nth_page() usage within folio in adjust_range_hwpoison()

From: Lorenzo Stoakes <hidden>
Date: 2025-08-28 15:46:36
Also in: dri-devel, intel-gfx, io-uring, kvm, linux-crypto, linux-ide, linux-iommu, linux-kselftest, linux-mips, linux-mm, linux-mmc, linux-riscv, linux-s390, linux-scsi, lkml, netdev, virtualization

On Thu, Aug 28, 2025 at 12:01:19AM +0200, David Hildenbrand wrote:
The nth_page() is not really required anymore, so let's remove it.
While at it, cleanup and simplify the code a bit.
Hm Not sure which bit is the cleanup? Was there meant to be more here or?
Signed-off-by: David Hildenbrand <redacted>
LGTM, so:

Reviewed-by: Lorenzo Stoakes <redacted>
quoted hunk ↗ jump to hunk
---
 fs/hugetlbfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 34d496a2b7de6..c5a46d10afaa0 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -217,7 +217,7 @@ static size_t adjust_range_hwpoison(struct folio *folio, size_t offset,
 			break;
 		offset += n;
 		if (offset == PAGE_SIZE) {
-			page = nth_page(page, 1);
+			page++;
LOL at that diff. Great!
 			offset = 0;
 		}
 	}
--
2.50.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help