Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755817AbdLGN1O (ORCPT ); Thu, 7 Dec 2017 08:27:14 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:60109 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755593AbdLGN1M (ORCPT ); Thu, 7 Dec 2017 08:27:12 -0500 From: Arnd Bergmann To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI Cc: Arnd Bergmann , Xin Long , Vasily Averin , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netfilter: fix clusterip_net_exit build regression Date: Thu, 7 Dec 2017 14:26:09 +0100 Message-Id: <20171207132636.259066-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:83RQHLtrjXPaurh43Wds9iHzptqs0sLBAPomhfh+zEwd00yyenO gEWs7o5Uf2MXwKpLxsUicTQsPiXo+CDHorKn9qL7AVzzUaOAGL2MojHACnDHvgcZ9aSkYan SPAtyU7OJ8wwO/ufNOvpcFQ3BBKIqfP3SfaaNEtYOfHjcFsw35rNWHVP/CudVQrqgIxEEXp 5PRyue2RB+6iUp2iayHVg== X-UI-Out-Filterresults: notjunk:1;V01:K0:mJizdJOD9X8=:q2VVh+PMLkhoUBiCUMHMwz vabqJqNJeiryCYHwOuEpEqGeeXoOHTEsA0css7CG3+dcrY+ilmAx455kZeiWfhX/tX5GwaXav 2dBAGZxrtphl7XdUTPliWEnK2b0WvPZ9TEwYh64hUQNpuO8RtgSw7kBxLxpZnZLO1KWUtoP6l 4OmYdSJUowjP0Un5Ej5qcBqS0YNP3KbCxwYDrg0DEfWTh9pJH5Ud0fSB9GMMhuoE+tztK0w5n uZvctQsbBsmu1VuYvFmXSOzcrsBHmn269PJxvrRyyve5hdSM0HL+MjU5oh3SkbCXkMKnO+Np2 WhumwAhCqzqLE2LZGKXlefAc+D3DkXi7HvjX0Ht0FLVK+U5d1lvqqQEfMJBBgFkkz10S30P5W M3uymsjagJ1O4vEWYaWOKEgSLLD11NsbBZYrMiGYimYDtu3I1QMGBMG4fdee2Sq/YLtRSwmKM qPuAyf/qahyEW60vakh6lSlIigeyF09WAf4Zys/fxYu3Dh+QonRxNsj4lYMsuBS2b/PcVOH2v BmOSiLieS7LhOOwuTZeyCYqVApm7NIugR5kYI3nVEAWr/seTDNtkJ9G5nWGxAWq6Q/l/N/tx9 XUDqkF6M7eS/KD+gp1tXzOb367UND51WrjIcM6INQgjAUsBfEHsOxTLhlcMz9R3bWYSRA+xUB 5+VHaHKakukr7hxsSSAfogvixEBnAqMYaJlLitzKUEeUG7/La1o8JGjqv6mYGKLWtg/ryDy/a /odwhbG9eXj9u7lx1LqsJ96vObcRKUPCM7jXn4FgQTflxqLhm0O/JGghZdI= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1049 Lines: 31 The added check produces a build error when CONFIG_PROC_FS is disabled: net/ipv4/netfilter/ipt_CLUSTERIP.c: In function 'clusterip_net_exit': net/ipv4/netfilter/ipt_CLUSTERIP.c:822:28: error: 'cn' undeclared (first use in this function) This moves the variable declaration out of the #ifdef to make it available to the WARN_ON_ONCE(). Fixes: 613d0776d3fe ("netfilter: exit_net cleanup check added") Signed-off-by: Arnd Bergmann --- net/ipv4/netfilter/ipt_CLUSTERIP.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index e35b8d074f06..69060e3abe85 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c @@ -813,8 +813,8 @@ static int clusterip_net_init(struct net *net) static void clusterip_net_exit(struct net *net) { -#ifdef CONFIG_PROC_FS struct clusterip_net *cn = net_generic(net, clusterip_net_id); +#ifdef CONFIG_PROC_FS proc_remove(cn->procdir); cn->procdir = NULL; #endif -- 2.9.0