Skip to content

Commit 66a1c22

Browse files
geertutehcaster
authored andcommitted
mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP
sh/migor_defconfig: mm/slab.c: In function ‘slab_memory_callback’: mm/slab.c:1127:23: error: implicit declaration of function ‘init_cache_node_node’; did you mean ‘drain_cache_node_node’? [-Werror=implicit-function-declaration] 1127 | ret = init_cache_node_node(nid); | ^~~~~~~~~~~~~~~~~~~~ | drain_cache_node_node The #ifdef condition protecting the definition of init_cache_node_node() no longer matches the conditions protecting the (multiple) users. Fix this by syncing the conditions. Fixes: 76af6a0 ("mm/migrate: add CPU hotplug to demotion #ifdef") Reported-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: John Paul Adrian Glaubitz <[email protected]> Acked-by: Randy Dunlap <[email protected]> Cc: <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]>
1 parent b45bc2e commit 66a1c22

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/slab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp)
839839
return 0;
840840
}
841841

842-
#if (defined(CONFIG_NUMA) && defined(CONFIG_MEMORY_HOTPLUG)) || defined(CONFIG_SMP)
842+
#if defined(CONFIG_NUMA) || defined(CONFIG_SMP)
843843
/*
844844
* Allocates and initializes node for a node on each slab cache, used for
845845
* either memory or cpu hotplug. If memory is being hot-added, the kmem_cache_node

0 commit comments

Comments
 (0)