summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2012-06-25 16:40:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 09:04:39 -0700
commitee92389156c2cdb45b94866186a4174858b820cd (patch)
treece025a20a1c679a511d174df4a0818f8146cbf0a /fs/nfs
parent10762419cafd82a9a3a6f68bef54c29f1af75842 (diff)
downloadlinux-3.10-ee92389156c2cdb45b94866186a4174858b820cd.tar.gz
linux-3.10-ee92389156c2cdb45b94866186a4174858b820cd.tar.bz2
linux-3.10-ee92389156c2cdb45b94866186a4174858b820cd.zip
SUNRPC: move per-net operations from svc_destroy()
upstream commit 786185b5f8abefa6a8a16695bb4a59c164d5a071. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index 26b38fb8102..cff39406f96 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -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;