Skip to content

Commit

Permalink
ipvs: Pass ipvs not net to ip_vs_sync_net_cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman authored and Simon Horman committed Sep 24, 2015
1 parent 802cb43 commit ebea1f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/net/ip_vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ void ip_vs_app_net_cleanup(struct net *net);
void ip_vs_protocol_net_cleanup(struct net *net);
void ip_vs_control_net_cleanup(struct net *net);
void ip_vs_estimator_net_cleanup(struct net *net);
void ip_vs_sync_net_cleanup(struct net *net);
void ip_vs_sync_net_cleanup(struct netns_ipvs *ipvs);
void ip_vs_service_net_cleanup(struct netns_ipvs *ipvs);

/* IPVS application functions
Expand Down
5 changes: 3 additions & 2 deletions net/netfilter/ipvs/ip_vs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2128,10 +2128,11 @@ static void __net_exit __ip_vs_cleanup(struct net *net)

static void __net_exit __ip_vs_dev_cleanup(struct net *net)
{
struct netns_ipvs *ipvs = net_ipvs(net);
EnterFunction(2);
net_ipvs(net)->enable = 0; /* Disable packet reception */
ipvs->enable = 0; /* Disable packet reception */
smp_wmb();
ip_vs_sync_net_cleanup(net);
ip_vs_sync_net_cleanup(ipvs);
LeaveFunction(2);
}

Expand Down
3 changes: 1 addition & 2 deletions net/netfilter/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -2015,10 +2015,9 @@ int __net_init ip_vs_sync_net_init(struct netns_ipvs *ipvs)
return 0;
}

void ip_vs_sync_net_cleanup(struct net *net)
void ip_vs_sync_net_cleanup(struct netns_ipvs *ipvs)
{
int retc;
struct netns_ipvs *ipvs = net_ipvs(net);

mutex_lock(&ipvs->sync_mutex);
retc = stop_sync_thread(ipvs, IP_VS_STATE_MASTER);
Expand Down

0 comments on commit ebea1f7

Please sign in to comment.