Skip to contentSkip to conversation

mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Sep 21, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

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 <[email protected]>
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.

---

 mm/gup.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
mm/gup.c renamed from mm/gup.c~mm-gup-drop-nth_page-usage-within-folio-when-recording-subpages +3 -4
@@ -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 [email protected] are