aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-08-05 18:22:52 +0100
committerAndrew Morton <akpm@linux-foundation.org>2025-09-13 16:55:07 -0700
commit56d578c1300f7efe9605b75714173dd3fda16fe2 (patch)
tree586f384aac18bb0a59fa7e7072c1d9bd24726150 /mm/sparse.c
parent53fbef56e07df822ea3029109ffca25328c2e5ac (diff)
downloadlinux-56d578c1300f7efe9605b75714173dd3fda16fe2.tar.gz
mm: convert page_to_section() to memdesc_section()
Pass in the memdesc_flags_t instead of a pointer to the page. This will allow us to remove a few conversions to struct page in upcoming patches. Link: https://lkml.kernel.org/r/20250805172307.1302730-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Shakeel Butt <shakeel.butt@linux.dev> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index e6075b62240707..7cb42cbfc7f9cf 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -45,7 +45,7 @@ static u16 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned;
int page_to_nid(const struct page *page)
{
- return section_to_node_table[page_to_section(page)];
+ return section_to_node_table[memdesc_section(page->flags)];
}
EXPORT_SYMBOL(page_to_nid);