* [merged mm-stable] mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages.patch removed from -mm tree
@ 2025-09-21 21:23 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-09-21 21:23 UTC (permalink / raw)
To: mm-commits, lorenzo.stoakes, david, akpm
The quilt patch titled
Subject: mm/gup: drop nth_page() usage within folio when recording subpages
has been removed from the -mm tree. Its filename was
mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: David Hildenbrand <david@redhat.com>
Subject: mm/gup: drop nth_page() usage within folio when recording subpages
Date: Mon, 1 Sep 2025 17:03:39 +0200
nth_page() is no longer required when iterating over pages within a single
folio, so let's just drop it when recording subpages.
Link: https://lkml.kernel.org/r/20250901150359.867252-19-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/gup.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/mm/gup.c~mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages
+++ a/mm/gup.c
@@ -488,12 +488,11 @@ static int record_subpages(struct page *
unsigned long addr, unsigned long end,
struct page **pages)
{
- struct page *start_page;
int nr;
- start_page = nth_page(page, (addr & (sz - 1)) >> PAGE_SHIFT);
+ page += (addr & (sz - 1)) >> PAGE_SHIFT;
for (nr = 0; addr != end; nr++, addr += PAGE_SIZE)
- pages[nr] = nth_page(start_page, nr);
+ pages[nr] = page++;
return nr;
}
@@ -1512,7 +1511,7 @@ next_page:
}
for (j = 0; j < page_increm; j++) {
- subpage = nth_page(page, j);
+ subpage = page + j;
pages[i + j] = subpage;
flush_anon_page(vma, subpage, start + j * PAGE_SIZE);
flush_dcache_page(subpage);
_
Patches currently in -mm which might be from david@redhat.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-21 21:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-21 21:23 [merged mm-stable] mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.