]> Git Repo - J-linux.git/commitdiff
mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP
authorGeert Uytterhoeven <[email protected]>
Tue, 21 Mar 2023 08:30:59 +0000 (09:30 +0100)
committerVlastimil Babka <[email protected]>
Wed, 22 Mar 2023 11:11:43 +0000 (12:11 +0100)
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: 76af6a054da40553 ("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]>
mm/slab.c

index 74ece29e3a7ea12898c8dc20a33ff7e16def7b38..0d35747b9472c62fb349484d2864f656f13a82de 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -839,7 +839,7 @@ static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp)
        return 0;
 }
 
-#if (defined(CONFIG_NUMA) && defined(CONFIG_MEMORY_HOTPLUG)) || defined(CONFIG_SMP)
+#if defined(CONFIG_NUMA) || defined(CONFIG_SMP)
 /*
  * Allocates and initializes node for a node on each slab cache, used for
  * either memory or cpu hotplug.  If memory is being hot-added, the kmem_cache_node
This page took 0.055745 seconds and 4 git commands to generate.