ipvs: Pass ipvs not net to ip_vs_sync_conn
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 21 Sep 2015 18:02:17 +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_conn.c
net/netfilter/ipvs/ip_vs_core.c
net/netfilter/ipvs/ip_vs_sync.c

index 71f4d338c208b76bd956b4fd9fb90e8d6d226da8..b10b337ce9745a1721e9c59466bd0144edb1d0c3 100644 (file)
@@ -1452,7 +1452,7 @@ static inline void ip_vs_dest_put_and_free(struct ip_vs_dest *dest)
 int start_sync_thread(struct netns_ipvs *ipvs, struct ipvs_sync_daemon_cfg *cfg,
                      int state);
 int stop_sync_thread(struct netns_ipvs *ipvs, int state);
-void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp, int pkts);
+void ip_vs_sync_conn(struct netns_ipvs *ipvs, struct ip_vs_conn *cp, int pkts);
 
 /* IPVS rate estimator prototypes (from ip_vs_est.c) */
 void ip_vs_start_estimator(struct net *net, struct ip_vs_stats *stats);
index d0d57f14bc76c3abec15b9b45df888af78b0d059..06809db5eef61987273c6aa314a0b30e29537b09 100644 (file)
@@ -801,7 +801,6 @@ static void ip_vs_conn_expire(unsigned long data)
 {
        struct ip_vs_conn *cp = (struct ip_vs_conn *)data;
        struct netns_ipvs *ipvs = cp->ipvs;
-       struct net *net = ipvs->net;
 
        /*
         *      do I control anybody?
@@ -847,7 +846,7 @@ static void ip_vs_conn_expire(unsigned long data)
        cp->timeout = 60*HZ;
 
        if (ipvs->sync_state & IP_VS_STATE_MASTER)
-               ip_vs_sync_conn(net, cp, sysctl_sync_threshold(ipvs));
+               ip_vs_sync_conn(ipvs, cp, sysctl_sync_threshold(ipvs));
 
        ip_vs_conn_put(cp);
 }
index 2e96500c6f3f8458c2ac06be61b7c911fd24579f..a8128b06f73bc0a9b0348c18c0a83559ba7929d3 100644 (file)
@@ -1842,7 +1842,7 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb, int af)
                pkts = atomic_add_return(1, &cp->in_pkts);
 
        if (ipvs->sync_state & IP_VS_STATE_MASTER)
-               ip_vs_sync_conn(net, cp, pkts);
+               ip_vs_sync_conn(ipvs, cp, pkts);
 
        ip_vs_conn_put(cp);
        return ret;
index 58ec7850ab0626baca9bbd4665b6b6944ebf0761..a0808f230cd6d98122565c1f0b30e57bfbdbe106 100644 (file)
@@ -614,7 +614,7 @@ static void ip_vs_sync_conn_v0(struct netns_ipvs *ipvs, struct ip_vs_conn *cp,
                        pkts = atomic_add_return(1, &cp->in_pkts);
                else
                        pkts = sysctl_sync_threshold(ipvs);
-               ip_vs_sync_conn(ipvs->net, cp, pkts);
+               ip_vs_sync_conn(ipvs, cp, pkts);
        }
 }
 
@@ -623,9 +623,8 @@ static void ip_vs_sync_conn_v0(struct netns_ipvs *ipvs, struct ip_vs_conn *cp,
  *      Called by ip_vs_in.
  *      Sending Version 1 messages
  */
-void ip_vs_sync_conn(struct net *net, struct ip_vs_conn *cp, int pkts)
+void ip_vs_sync_conn(struct netns_ipvs *ipvs, struct ip_vs_conn *cp, int pkts)
 {
-       struct netns_ipvs *ipvs = net_ipvs(net);
        struct ip_vs_sync_mesg *m;
        union ip_vs_sync_conn *s;
        struct ip_vs_sync_buff *buff;
This page took 0.030971 seconds and 5 git commands to generate.