ipvs: Pass ipvs not net into ip_vs_conn_net_flush
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 21 Sep 2015 18:02:41 +0000 (13:02 -0500)
committerSimon Horman <horms@verge.net.au>
Thu, 24 Sep 2015 00:34:41 +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>
net/netfilter/ipvs/ip_vs_conn.c

index a99bbf6c820224c3d431cbd4687b2a72bc772527..4bb1b7d1286d48dabba07469ae348d245ca31113 100644 (file)
@@ -1309,11 +1309,10 @@ void ip_vs_random_dropentry(struct netns_ipvs *ipvs)
 /*
  *      Flush all the connection entries in the ip_vs_conn_tab
  */
-static void ip_vs_conn_flush(struct net *net)
+static void ip_vs_conn_flush(struct netns_ipvs *ipvs)
 {
        int idx;
        struct ip_vs_conn *cp, *cp_c;
-       struct netns_ipvs *ipvs = net_ipvs(net);
 
 flush_again:
        rcu_read_lock();
@@ -1359,8 +1358,10 @@ int __net_init ip_vs_conn_net_init(struct net *net)
 
 void __net_exit ip_vs_conn_net_cleanup(struct net *net)
 {
+       struct netns_ipvs *ipvs = net_ipvs(net);
+
        /* flush all the connection entries first */
-       ip_vs_conn_flush(net);
+       ip_vs_conn_flush(ipvs);
        remove_proc_entry("ip_vs_conn", net->proc_net);
        remove_proc_entry("ip_vs_conn_sync", net->proc_net);
 }