]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mm: simplify folio_page() and folio_page_idx()
authorDavid Hildenbrand <david@redhat.com>
Mon, 1 Sep 2025 15:03:33 +0000 (17:03 +0200)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:03 +0000 (14:22 -0700)
commit73b3294b1152e94c1971a735b8db8c7503fd97a1
tree8c0ef275b550eaf226f14037ee3f9af49fdcd85a
parent4751c39eee0c3fcc742aa7d7242ce2b78faa3606
mm: simplify folio_page() and folio_page_idx()

Now that a single folio/compound page can no longer span memory sections
in problematic kernel configurations, we can stop using nth_page() in
folio_page() and folio_page_idx().

While at it, turn both macros into static inline functions and add kernel
doc for folio_page_idx().

Link: https://lkml.kernel.org/r/20250901150359.867252-13-david@redhat.com
Signed-off-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
include/linux/page-flags.h