SUNRPC: move per-net operations from svc_destroy()
The idea is to separate service destruction and per-net operations, because these are two different things and the mix looks ugly. Notes: 1) For NFS server this patch looks ugly (sorry for that). But these place will be rewritten soon during NFSd containerization. 2) LockD per-net counter increase int lockd_up() was moved prior to make_socks() to make lockd_down_net() call safe in case of error. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
此提交包含在:
@@ -314,6 +314,8 @@ out_err:
|
||||
dprintk("NFS: Couldn't create callback socket or server thread; "
|
||||
"err = %d\n", ret);
|
||||
cb_info->users--;
|
||||
if (serv)
|
||||
svc_shutdown_net(serv, net);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -328,6 +330,7 @@ void nfs_callback_down(int minorversion)
|
||||
cb_info->users--;
|
||||
if (cb_info->users == 0 && cb_info->task != NULL) {
|
||||
kthread_stop(cb_info->task);
|
||||
svc_shutdown_net(cb_info->serv, current->nsproxy->net_ns);
|
||||
svc_exit_thread(cb_info->rqst);
|
||||
cb_info->serv = NULL;
|
||||
cb_info->rqst = NULL;
|
||||
|
新增問題並參考
封鎖使用者