mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 17:30:59 +07:00
ipvs: Pass ipvs not net to ip_vs_genl_del_daemon
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>
This commit is contained in:
parent
d8443c5f2b
commit
df04ffb766
@ -3439,16 +3439,15 @@ static int ip_vs_genl_new_daemon(struct netns_ipvs *ipvs, struct nlattr **attrs)
|
|||||||
return ret;
|
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;
|
int ret;
|
||||||
|
|
||||||
if (!attrs[IPVS_DAEMON_ATTR_STATE])
|
if (!attrs[IPVS_DAEMON_ATTR_STATE])
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
mutex_lock(&ipvs->sync_mutex);
|
mutex_lock(&ipvs->sync_mutex);
|
||||||
ret = stop_sync_thread(net,
|
ret = stop_sync_thread(ipvs->net,
|
||||||
nla_get_u32(attrs[IPVS_DAEMON_ATTR_STATE]));
|
nla_get_u32(attrs[IPVS_DAEMON_ATTR_STATE]));
|
||||||
mutex_unlock(&ipvs->sync_mutex);
|
mutex_unlock(&ipvs->sync_mutex);
|
||||||
return ret;
|
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)
|
if (cmd == IPVS_CMD_NEW_DAEMON)
|
||||||
ret = ip_vs_genl_new_daemon(ipvs, daemon_attrs);
|
ret = ip_vs_genl_new_daemon(ipvs, daemon_attrs);
|
||||||
else
|
else
|
||||||
ret = ip_vs_genl_del_daemon(net, daemon_attrs);
|
ret = ip_vs_genl_del_daemon(ipvs, daemon_attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
Loading…
Reference in New Issue
Block a user