From 51875badc0a03f88d1426f935ff152c702b1ca71 Mon Sep 17 00:00:00 2001 From: Qi Xi Date: Fri, 28 Nov 2025 09:43:33 +0800 Subject: [PATCH] mm: proc: fix compile warning when CONFIG_NUMA=n hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID980J -------------------------------- Fix compile warning: 'numa_maps_next' defined but not used. The function use is controlled by CONFIG_NUMA, so its definition should be compiled under the same config option. Fixes: 094a76ab06c3 ("mm: proc: use per_vma mmap_lock for vma traversal.") Signed-off-by: Qi Xi --- fs/proc/task_mmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 4370eb895e76..2dbc954ec8e7 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -182,6 +182,7 @@ static void *m_next(struct seq_file *m, void *v, loff_t *ppos) return next; } +#ifdef CONFIG_NUMA static void *numa_maps_next(struct seq_file *m, void *v, loff_t *ppos) { struct proc_maps_private *priv = m->private; @@ -277,6 +278,7 @@ static void *numa_maps_next(struct seq_file *m, void *v, loff_t *ppos) *ppos = next ? next->vm_start : -1UL; return next; } +#endif /* CONFIG_NUMA */ static void m_stop(struct seq_file *m, void *v) { -- Gitee