Commit c60856c6 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Simon Horman

ipvs: Pass ipvs not net to ip_vs_zero_all

Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: default avatarJulian Anastasov <ja@ssi.bg>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent 56d2169b
...@@ -1576,9 +1576,8 @@ static int ip_vs_zero_service(struct ip_vs_service *svc) ...@@ -1576,9 +1576,8 @@ static int ip_vs_zero_service(struct ip_vs_service *svc)
return 0; return 0;
} }
static int ip_vs_zero_all(struct net *net) static int ip_vs_zero_all(struct netns_ipvs *ipvs)
{ {
struct netns_ipvs *ipvs = net_ipvs(net);
int idx; int idx;
struct ip_vs_service *svc; struct ip_vs_service *svc;
...@@ -2384,7 +2383,7 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) ...@@ -2384,7 +2383,7 @@ do_ip_vs_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len)
if (cmd == IP_VS_SO_SET_ZERO) { if (cmd == IP_VS_SO_SET_ZERO) {
/* if no service address is set, zero counters in all */ /* if no service address is set, zero counters in all */
if (!usvc.fwmark && !usvc.addr.ip && !usvc.port) { if (!usvc.fwmark && !usvc.addr.ip && !usvc.port) {
ret = ip_vs_zero_all(net); ret = ip_vs_zero_all(ipvs);
goto out_unlock; goto out_unlock;
} }
} }
...@@ -3530,7 +3529,7 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info) ...@@ -3530,7 +3529,7 @@ static int ip_vs_genl_set_cmd(struct sk_buff *skb, struct genl_info *info)
goto out; goto out;
} else if (cmd == IPVS_CMD_ZERO && } else if (cmd == IPVS_CMD_ZERO &&
!info->attrs[IPVS_CMD_ATTR_SERVICE]) { !info->attrs[IPVS_CMD_ATTR_SERVICE]) {
ret = ip_vs_zero_all(net); ret = ip_vs_zero_all(ipvs);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment