ipvs: Pass ipvs not net to ip_vs_sync_net_cleanup
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 21 Sep 2015 18:02:21 +0000 (13:02 -0500)
committerSimon Horman <horms@verge.net.au>
Thu, 24 Sep 2015 00:34:38 +0000 (09:34 +0900)
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
include/net/ip_vs.h
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_sync.c

index 47a4cddb7c331092c2791b86ece7daf8b4e11f6a..f3ddf7696d680ca8b8a7fcabc3deff1c8395268b 100644 (file)
@@ -1334,7 +1334,7 @@ void ip_vs_app_net_cleanup(struct net *net);
 void ip_vs_protocol_net_cleanup(struct net *net);
 void ip_vs_control_net_cleanup(struct net *net);
 void ip_vs_estimator_net_cleanup(struct net *net);
-void ip_vs_sync_net_cleanup(struct net *net);
+void ip_vs_sync_net_cleanup(struct netns_ipvs *ipvs);
 void ip_vs_service_net_cleanup(struct netns_ipvs *ipvs);
 
 /* IPVS application functions
index 5a5a6d63b3d98b2fd039c97606e1e637451bade9..cae395fc6523d4d7f6d6d0d0afe8ec51e74d85a1 100644 (file)
@@ -2128,10 +2128,11 @@ static void __net_exit __ip_vs_cleanup(struct net *net)
 
 static void __net_exit __ip_vs_dev_cleanup(struct net *net)
 {
+       struct netns_ipvs *ipvs = net_ipvs(net);
        EnterFunction(2);
-       net_ipvs(net)->enable = 0;      /* Disable packet reception */
+       ipvs->enable = 0;       /* Disable packet reception */
        smp_wmb();
-       ip_vs_sync_net_cleanup(net);
+       ip_vs_sync_net_cleanup(ipvs);
        LeaveFunction(2);
 }
 
index 11b4f17e2e1a864fda78b959f8362c34c3528020..803001a45aa16e6b5a372ab385dba8e9c09bd2f0 100644 (file)
@@ -2015,10 +2015,9 @@ int __net_init ip_vs_sync_net_init(struct netns_ipvs *ipvs)
        return 0;
 }
 
-void ip_vs_sync_net_cleanup(struct net *net)
+void ip_vs_sync_net_cleanup(struct netns_ipvs *ipvs)
 {
        int retc;
-       struct netns_ipvs *ipvs = net_ipvs(net);
 
        mutex_lock(&ipvs->sync_mutex);
        retc = stop_sync_thread(ipvs, IP_VS_STATE_MASTER);
This page took 0.029317 seconds and 5 git commands to generate.