diff mbox series

[linux-next:pending-fixes,301/373] mm/vmscan.c:3498: undefined reference to `pmdp_test_and_clear_young'

Message ID 20241025192106.957236-1-jthoughton@google.com (mailing list archive)
State New
Headers show
Series None | expand

Commit Message

James Houghton Oct. 25, 2024, 7:21 p.m. UTC
Hi Andrew,

The following diff applied to the second patch[1] fixes this error. The
diff mbox series

Patch

diff is functionally a no-op; the get_pmd_pfn() immediately following
the code here would return -1 in the !pmd_present() case.

I can send a brand new patch if you'd prefer.

[1]: https://lore.kernel.org/linux-mm/20241019012940.3656292-3-jthoughton@google.com/

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 29c098790b01..70604eef0dd3 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -3486,7 +3486,10 @@  static void walk_pmd_range_locked(pud_t *pud, unsigned long addr, struct vm_area
 		/* don't round down the first address */
 		addr = i ? (*first & PMD_MASK) + i * PMD_SIZE : *first;
 
-		if (pmd_present(pmd[i]) && !pmd_trans_huge(pmd[i])) {
+		if (!pmd_present(pmd[i]))
+			goto next;
+
+		if (!pmd_trans_huge(pmd[i])) {
 			if (!walk->force_scan && should_clear_pmd_young() &&
 			    !mm_has_notifiers(args->mm))
 				pmdp_test_and_clear_young(vma, addr, pmd + i);