ipvs: Pass ipvs not net to stop_sync_thread
[firefly-linux-kernel-4.4.55.git] / net / netfilter / ipvs / ip_vs_sync.c
index 90c455c0b42b62eb78fa48b83e443063ef778877..0b2e01aa764ad0b380d839995920be4f7c239342 100644 (file)
@@ -1946,9 +1946,8 @@ out:
 }
 
 
-int stop_sync_thread(struct net *net, int state)
+int stop_sync_thread(struct netns_ipvs *ipvs, int state)
 {
-       struct netns_ipvs *ipvs = net_ipvs(net);
        struct task_struct **array;
        int id;
        int retc = -EINVAL;
@@ -2030,11 +2029,11 @@ void ip_vs_sync_net_cleanup(struct net *net)
        struct netns_ipvs *ipvs = net_ipvs(net);
 
        mutex_lock(&ipvs->sync_mutex);
-       retc = stop_sync_thread(net, IP_VS_STATE_MASTER);
+       retc = stop_sync_thread(ipvs, IP_VS_STATE_MASTER);
        if (retc && retc != -ESRCH)
                pr_err("Failed to stop Master Daemon\n");
 
-       retc = stop_sync_thread(net, IP_VS_STATE_BACKUP);
+       retc = stop_sync_thread(ipvs, IP_VS_STATE_BACKUP);
        if (retc && retc != -ESRCH)
                pr_err("Failed to stop Backup Daemon\n");
        mutex_unlock(&ipvs->sync_mutex);