]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm: replace READ_ONCE() in pud_trans_unstable()
authorAnshuman Khandual <anshuman.khandual@arm.com>
Fri, 27 Feb 2026 04:03:00 +0000 (04:03 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:11 +0000 (13:53 -0700)
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 <anshuman.khandual@arm.com>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Acked-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/pgtable.h

index 776993d4567b48697ba3500a72814d7b4815cc6f..d2767a4c027b69af1250260d87d9c3f498efde11 100644 (file)
@@ -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;