Skip to contentSkip to conversation

mm-gup-move-pmd_protnone-into-gup_fast_pmd_leaf.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Oct 7

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: gup: move pmd_protnone() into gup_fast_pmd_leaf()
has been removed from the -mm tree. Its filename was
mm-gup-move-pmd_protnone-into-gup_fast_pmd_leaf.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: Aristeu Rozanski <[email protected]>
Subject: mm: gup: move pmd_protnone() into gup_fast_pmd_leaf()
Date: Thu, 27 Aug 2026 21:55:43 -0400

Patch series "mm: gup: cleanup gup_fast call chain", v3.

These two patches implement the refactor in gup_fast call chain David Hildenbrand mentioned in [1].

This patch (of 2):

Make pmd handling match pud handling by calling pmd_protnone() inside gup_fast_pmd_leaf().

---

 mm/gup.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
mm/gup.c renamed from mm/gup.c~mm-gup-move-pmd_protnone-into-gup_fast_pmd_leaf +4 -4
@@ -2929,6 +2929,10 @@ static int gup_fast_pmd_leaf(pmd_t orig,
 	struct folio *folio;
 	int refs;
 
+	/* See gup_fast_pte_range() */
+	if (pmd_protnone(orig))
+		return 0;
+
 	if (!pmd_access_permitted(orig, flags & FOLL_WRITE))
 		return 0;
 
@@ -3024,10 +3028,6 @@ static int gup_fast_pmd_range(pud_t *pud
 			return 0;
 
 		if (unlikely(pmd_leaf(pmd))) {
-			/* See gup_fast_pte_range() */
-			if (pmd_protnone(pmd))
-				return 0;
-
 			if (!gup_fast_pmd_leaf(pmd, pmdp, addr, next, flags,
 				pages, nr))
 				return 0;

_

Patches currently in -mm which might be from [email protected] are