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

index 847ea2fd44dbd345753deff94144904706278bcc..08d772c289d719e8afd45476aa45ba5cfb6eb0c2 100644 (file)
@@ -3439,16 +3439,15 @@ static int ip_vs_genl_new_daemon(struct netns_ipvs *ipvs, struct nlattr **attrs)
        return ret;
 }
 
-static int ip_vs_genl_del_daemon(struct net *net, struct nlattr **attrs)
+static int ip_vs_genl_del_daemon(struct netns_ipvs *ipvs, struct nlattr **attrs)
 {
-       struct netns_ipvs *ipvs = net_ipvs(net);
        int ret;
 
        if (!attrs[IPVS_DAEMON_ATTR_STATE])
                return -EINVAL;
 
        mutex_lock(&ipvs->sync_mutex);
-       ret = stop_sync_thread(net,
+       ret = stop_sync_thread(ipvs->net,
                               nla_get_u32(attrs[IPVS_DAEMON_ATTR_STATE]));
        mutex_unlock(&ipvs->sync_mutex);
        return ret;
@@ -3496,7 +3495,7 @@ static int ip_vs_genl_set_daemon(struct sk_buff *skb, struct genl_info *info)
                if (cmd == IPVS_CMD_NEW_DAEMON)
                        ret = ip_vs_genl_new_daemon(ipvs, daemon_attrs);
                else
-                       ret = ip_vs_genl_del_daemon(net, daemon_attrs);
+                       ret = ip_vs_genl_del_daemon(ipvs, daemon_attrs);
        }
 
 out: