From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61FB68BE0 for ; Tue, 28 Mar 2023 14:52:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7E96C433D2; Tue, 28 Mar 2023 14:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1680015143; bh=d8hX0/KZrx5W90ZU4YeAvPTp1aGZ5DfYQNaBWyUr2nQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LeVjuKsiHqDsMTAEaAKGOoszidCtKFDY7L1EYwFyrQMarRg/J1Ev+g73FtxygPNch J4WD8/D+yFgfk7nd5FpIZNdPMv2K6g1Sznt8IsmCgxkBDWvIXlhHyy1NLEBfDwpZkW py9VA/eYinnJsNojFHXXYJ83ydtYuEe3rL3bIDNI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Randy Dunlap , Geert Uytterhoeven , John Paul Adrian Glaubitz , Vlastimil Babka Subject: [PATCH 6.2 182/240] mm/slab: Fix undefined init_cache_node_node() for NUMA and !SMP Date: Tue, 28 Mar 2023 16:42:25 +0200 Message-Id: <20230328142627.211424423@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230328142619.643313678@linuxfoundation.org> References: <20230328142619.643313678@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Geert Uytterhoeven 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 Link: https://lore.kernel.org/r/b5bdea22-ed2f-3187-6efe-0c72330270a4@infradead.org Signed-off-by: Geert Uytterhoeven Reviewed-by: John Paul Adrian Glaubitz Acked-by: Randy Dunlap Cc: Signed-off-by: Vlastimil Babka Signed-off-by: Greg Kroah-Hartman --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/slab.c +++ b/mm/slab.c @@ -840,7 +840,7 @@ static int init_cache_node(struct kmem_c 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