[folded-merged] mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer-fix.patch removed from -mm tree

Andrew Morton <[email protected]> Tue, 28 Jul 2026 20:56:33 -0700
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer-fix
has been removed from the -mm tree.  Its filename was
     mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer-fix.patch

This patch was dropped because it was folded into mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer.patch

------------------------------------------------------
From: Hui Zhu <[email protected]>
Subject: mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer-fix
Date: Wed, 8 Jul 2026 16:33:08 +0800

v11:
According to the comments of David, simplify page_to_nid() to pass
&(PF_POISONED_CHECK(page)->flags) directly.

v10:
According to the comments of David, drop the redundant CONFIG_NUMA split
in page_to_nid()/folio_nid() and remove the SECTIONS_WIDTH != 0 guard
around ASSERT_EXCLUSIVE_BITS() in memdesc_section().

Link: https://lore.kernel.org/[email protected]
Co-developed-by: David Hildenbrand (Arm) <[email protected]>
Signed-off-by: David Hildenbrand (Arm) <[email protected]>
Signed-off-by: Hui Zhu <[email protected]>
Acked-by: David Hildenbrand (Arm) <[email protected]>
Cc: Axel Rasmussen <[email protected]>
Cc: Barry Song <[email protected]>
Cc: Kairui Song <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Mike Rapoport <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: Wei Xu <[email protected]>
Cc: Yuanchu Xie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 include/linux/mm.h |   18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

--- a/include/linux/mm.h~mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer-fix
+++ a/include/linux/mm.h
@@ -2303,29 +2303,15 @@ static inline int memdesc_nid(const memd
 #endif
 #endif
 
-#ifdef CONFIG_NUMA
 static inline int page_to_nid(const struct page *page)
 {
-	const struct page *p = PF_POISONED_CHECK(page);
-
-	return memdesc_nid(&p->flags);
+	return memdesc_nid(&(PF_POISONED_CHECK(page)->flags));
 }
 
 static inline int folio_nid(const struct folio *folio)
 {
 	return memdesc_nid(&folio->flags);
 }
-#else
-static inline int page_to_nid(const struct page *page)
-{
-	return 0;
-}
-
-static inline int folio_nid(const struct folio *folio)
-{
-	return 0;
-}
-#endif
 
 #ifdef CONFIG_NUMA_BALANCING
 /* page access time bits needs to hold at least 4 seconds */
@@ -2566,9 +2552,7 @@ static inline void set_page_section(stru
 
 static inline unsigned long memdesc_section(const memdesc_flags_t *mdf)
 {
-#if SECTIONS_WIDTH != 0
 	ASSERT_EXCLUSIVE_BITS(mdf->f, SECTIONS_MASK << SECTIONS_PGSHIFT);
-#endif
 	return (mdf->f >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
 }
 #else /* !SECTION_IN_PAGE_FLAGS */
_

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

mm-fix-assert_exclusive_bits-by-passing-memdesc_flags_t-by-pointer.patch