diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-08-05 18:22:53 +0100 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-13 16:55:07 -0700 |
| commit | eb00fdd84ddabd6948d26595bb5e8c1302220d37 (patch) | |
| tree | 1184dad5d4a4aeaab46f9eb87663591b73e12611 /mm/sparse.c | |
| parent | 56d578c1300f7efe9605b75714173dd3fda16fe2 (diff) | |
| download | linux-eb00fdd84ddabd6948d26595bb5e8c1302220d37.tar.gz | |
mm: introduce memdesc_nid()
Remove a conversion from folio to page by passing the folio->flags (which
are a copy of the page->flags) to the new memdesc_nid() function.
Link: https://lkml.kernel.org/r/20250805172307.1302730-4-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 7cb42cbfc7f9cf..17c50a6415c2db 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -43,11 +43,11 @@ static u8 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned; static u16 section_to_node_table[NR_MEM_SECTIONS] __cacheline_aligned; #endif -int page_to_nid(const struct page *page) +int memdesc_nid(memdesc_flags_t mdf) { - return section_to_node_table[memdesc_section(page->flags)]; + return section_to_node_table[memdesc_section(mdf)]; } -EXPORT_SYMBOL(page_to_nid); +EXPORT_SYMBOL(memdesc_nid); static void set_section_nid(unsigned long section_nr, int nid) { |
