summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2023-03-21 09:30:59 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-30 12:49:23 +0200
commitf311869d72f7bc15cbb8854a8e866c38c215143d (patch)
treec49d4857742607abdeeabf23714cce01c3583409 /mm
parenta6766e457d4cde7ffe3ea0c91afe26a0be8dd21d (diff)
downloadlinux-starfive-f311869d72f7bc15cbb8854a8e866c38c215143d.tar.gz
linux-starfive-f311869d72f7bc15cbb8854a8e866c38c215143d.tar.bz2
linux-starfive-f311869d72f7bc15cbb8854a8e866c38c215143d.zip
mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP
commit 66a1c22b709178e7b823d44465d0c2e5ed7492fb upstream. 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 <rdunlap@infradead.org> Link: https://lore.kernel.org/r/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: <stable@vger.kernel.org> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 59c8e28f7b6a..62869bc3c2f9 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -840,7 +840,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