From: David Hildenbrand Date: Mon, 1 Sep 2025 15:03:36 +0000 (+0200) Subject: fs: hugetlbfs: remove nth_page() usage within folio in adjust_range_hwpoison() X-Git-Tag: v6.18-rc1~130^2~172 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=06d42cf49eb740da7dbc4c5fc138a0fdce67417c;p=thirdparty%2Fkernel%2Fstable.git fs: hugetlbfs: remove nth_page() usage within folio in adjust_range_hwpoison() The nth_page() is not really required anymore, so let's remove it. Link: https://lkml.kernel.org/r/20250901150359.867252-16-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Reviewed-by: Lorenzo Stoakes Signed-off-by: Andrew Morton --- 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++; offset = 0; } }