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

index 638a301f7ee43f698a1d35f51a4ae22e65e2a086..c86dc456c8f43f1990ecd5dcff9ad38b31c03b54 100644 (file)
@@ -102,10 +102,8 @@ static void estimation_timer(unsigned long arg)
        struct ip_vs_estimator *e;
        struct ip_vs_stats *s;
        u64 rate;
-       struct net *net = (struct net *)arg;
-       struct netns_ipvs *ipvs;
+       struct netns_ipvs *ipvs = (struct netns_ipvs *)arg;
 
-       ipvs = net_ipvs(net);
        spin_lock(&ipvs->est_lock);
        list_for_each_entry(e, &ipvs->est_list, list) {
                s = container_of(e, struct ip_vs_stats, est);
@@ -196,7 +194,7 @@ int __net_init ip_vs_estimator_net_init(struct net *net)
 
        INIT_LIST_HEAD(&ipvs->est_list);
        spin_lock_init(&ipvs->est_lock);
-       setup_timer(&ipvs->est_timer, estimation_timer, (unsigned long)net);
+       setup_timer(&ipvs->est_timer, estimation_timer, (unsigned long)ipvs);
        mod_timer(&ipvs->est_timer, jiffies + 2 * HZ);
        return 0;
 }