Skip to content

Commit

Permalink
ipvs: Pass ipvs not net to ip_vs_sync_net_init
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 1fc1200 commit 802cb43
Show file tree
Hide file tree
Showing 3 changed files with 3 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 @@ -1328,7 +1328,7 @@ int ip_vs_control_net_init(struct net *net);
int ip_vs_protocol_net_init(struct net *net);
int ip_vs_app_net_init(struct net *net);
int ip_vs_conn_net_init(struct net *net);
int ip_vs_sync_net_init(struct net *net);
int ip_vs_sync_net_init(struct netns_ipvs *ipvs);
void ip_vs_conn_net_cleanup(struct net *net);
void ip_vs_app_net_cleanup(struct net *net);
void ip_vs_protocol_net_cleanup(struct net *net);
Expand Down
2 changes: 1 addition & 1 deletion net/netfilter/ipvs/ip_vs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ static int __net_init __ip_vs_init(struct net *net)
if (ip_vs_conn_net_init(net) < 0)
goto conn_fail;

if (ip_vs_sync_net_init(net) < 0)
if (ip_vs_sync_net_init(ipvs) < 0)
goto sync_fail;

printk(KERN_INFO "IPVS: Creating netns size=%zu id=%d\n",
Expand Down
4 changes: 1 addition & 3 deletions net/netfilter/ipvs/ip_vs_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,10 +2007,8 @@ int stop_sync_thread(struct netns_ipvs *ipvs, int state)
/*
* Initialize data struct for each netns
*/
int __net_init ip_vs_sync_net_init(struct net *net)
int __net_init ip_vs_sync_net_init(struct netns_ipvs *ipvs)
{
struct netns_ipvs *ipvs = net_ipvs(net);

__mutex_init(&ipvs->sync_mutex, "ipvs->sync_mutex", &__ipvs_sync_key);
spin_lock_init(&ipvs->sync_lock);
spin_lock_init(&ipvs->sync_buff_lock);
Expand Down

0 comments on commit 802cb43

Please sign in to comment.