]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fs: hugetlbfs: remove nth_page() usage within folio in adjust_range_hwpoison()
authorDavid Hildenbrand <david@redhat.com>
Mon, 1 Sep 2025 15:03:36 +0000 (17:03 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 12 Sep 2025 00:25:32 +0000 (17:25 -0700)
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 <david@redhat.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/hugetlbfs/inode.c

index 34d496a2b7de6a36a99808284e759b95cc9df862..c5a46d10afaa0910ed56be147db059b3682f95dd 100644 (file)
@@ -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;
                }
        }