Skip to contentSkip to conversation

mm-allow-a-null-fn-callback-in-apply_to_page_range.patch removed from -mm tree

merged [email protected] 1 participant 1 message Oct 22, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm: allow a NULL fn callback in apply_to_page_range
has been removed from the -mm tree. Its filename was
mm-allow-a-null-fn-callback-in-apply_to_page_range.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Christoph Hellwig <[email protected]>
Subject: mm: allow a NULL fn callback in apply_to_page_range

Besides calling the callback on each page, apply_to_page_range also has the effect of pre-faulting all PTEs for the range. To support callers that only need the pre-faulting, make the callback optional.

Based on a patch from Minchan Kim <[email protected]>.

Cc Boris Ostrovsky <[email protected]>
Cc Chris Wilson <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Joonas Lahtinen <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Matthew Auld <[email protected]>
Cc "Matthew Wilcox (Oracle)" <[email protected]>
Cc Nitin Gupta <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Rodrigo Vivi <[email protected]>
Cc Stefano Stabellini <[email protected]>
Cc Tvrtko Ursulin <[email protected]>
Cc Uladzislau Rezki (Sony) <[email protected]>

---

 mm/memory.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
mm/memory.c renamed from mm/memory.c~mm-allow-a-null-fn-callback-in-apply_to_page_range +9 -7
@@ -2391,13 +2391,15 @@ static int apply_to_pte_range(struct mm_
 
 	arch_enter_lazy_mmu_mode();
 
-	do {
-		if (create || !pte_none(*pte)) {
-			err = fn(pte++, addr, data);
-			if (err)
-				break;
-		}
-	} while (addr += PAGE_SIZE, addr != end);
+	if (fn) {
+		do {
+			if (create || !pte_none(*pte)) {
+				err = fn(pte++, addr, data);
+				if (err)
+					break;
+			}
+		} while (addr += PAGE_SIZE, addr != end);
+	}
 	*mask |= PGTBL_PTE_MODIFIED;
 
 	arch_leave_lazy_mmu_mode();

_

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