From: Anshuman Khandual Date: Fri, 27 Feb 2026 04:03:00 +0000 (+0000) Subject: mm: replace READ_ONCE() in pud_trans_unstable() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d56d7317b271a1a5030ebb135c58aedc4c0fd36;p=thirdparty%2Flinux.git mm: replace READ_ONCE() in pud_trans_unstable() Replace READ_ONCE() with the existing standard page table accessor for PUD aka pudp_get() in pud_trans_unstable(). This does not create any functional change for platforms that do not override pudp_get(), which still defaults to READ_ONCE(). Link: https://lkml.kernel.org/r/20260227040300.2091901-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: David Hildenbrand (Arm) Acked-by: SeongJae Park Reviewed-by: Lorenzo Stoakes Cc: Mike Rapoport Signed-off-by: Andrew Morton --- diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 776993d4567b4..d2767a4c027b6 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -2004,7 +2004,7 @@ static inline int pud_trans_unstable(pud_t *pud) { #if defined(CONFIG_TRANSPARENT_HUGEPAGE) && \ defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) - pud_t pudval = READ_ONCE(*pud); + pud_t pudval = pudp_get(pud); if (pud_none(pudval) || pud_trans_huge(pudval)) return 1;