From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Khorenko Date: Fri, 21 Aug 2026 18:37:00 +0200 Subject: [Devel] [PATCH vz10 14/32] mm/memcontrol: build memory.numa_migrate only with CONFIG_NUMA In-Reply-To: <20260821163718.187766-1-khorenko@virtuozzo.com> References: <20260821163718.187766-1-khorenko@virtuozzo.com> Message-ID: <20260821163718.187766-15-khorenko@virtuozzo.com> List-Id: From: Eva Kurchatova memcg_numa_migrate_write() is defined inside the CONFIG_NUMA block of memcontrol.c, but its cgroup-v2 cftype entry was added after the #endif, so CONFIG_NUMA=n does not build: mm/memcontrol.c: error: 'memcg_numa_migrate_write' undeclared here (not in a function) Move the entry inside the same CONFIG_NUMA block, next to memory.numa_stat. A kernel built without NUMA has no nodes to migrate memory between, so not offering the file is the right behaviour rather than a limitation. Fixes: fe28fa7a0794 ("mm/memcontrol: add memory.numa_migrate to cgroup-v2") Feature: mm: interface to migrate memory between NUMA nodes upon userspace request https://virtuozzo.atlassian.net/browse/VSTOR-134732 Signed-off-by: Eva Kurchatova Signed-off-by: Konstantin Khorenko --- mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 6301319529ee..4e0c0c46689a 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -5258,12 +5258,12 @@ static struct cftype memory_files[] = { .name = "numa_stat", .seq_show = memory_numa_stat_show, }, -#endif { .name = "numa_migrate", .flags = CFTYPE_NOT_ON_ROOT, .write = memcg_numa_migrate_write, }, +#endif { .name = "oom.group", .flags = CFTYPE_NOT_ON_ROOT | CFTYPE_NS_DELEGATABLE, -- 2.47.1