diff options
author | 2012-07-03 16:46:41 +0400 | |
---|---|---|
committer | 2012-07-25 09:21:30 -0400 | |
commit | 19f7e2ca44dfc3c1b3f499fc46801f98d403500f (patch) | |
tree | 765d6e60ace4a723f5e0b8e393728b1a92bcd863 /fs/nfsd/nfssvc.c | |
parent | nfsd: add get_uint for u32's (diff) | |
download | linux-19f7e2ca44dfc3c1b3f499fc46801f98d403500f.tar.gz linux-19f7e2ca44dfc3c1b3f499fc46801f98d403500f.tar.bz2 linux-19f7e2ca44dfc3c1b3f499fc46801f98d403500f.zip |
NFSd: introduce nfsd_destroy() helper
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfssvc.c')
-rw-r--r-- | fs/nfsd/nfssvc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index ee709fc8f58b..8621e36ce8dd 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -427,11 +427,7 @@ int nfsd_set_nrthreads(int n, int *nthreads) if (err) break; } - - if (nfsd_serv->sv_nrthreads == 1) - svc_shutdown_net(nfsd_serv, net); - svc_destroy(nfsd_serv); - + nfsd_destroy(net); return err; } @@ -478,9 +474,7 @@ out_shutdown: if (error < 0 && !nfsd_up_before) nfsd_shutdown(); out_destroy: - if (nfsd_serv->sv_nrthreads == 1) - svc_shutdown_net(nfsd_serv, net); - svc_destroy(nfsd_serv); /* Release server */ + nfsd_destroy(net); /* Release server */ out: mutex_unlock(&nfsd_mutex); return error; @@ -682,9 +676,7 @@ int nfsd_pool_stats_release(struct inode *inode, struct file *file) mutex_lock(&nfsd_mutex); /* this function really, really should have been called svc_put() */ - if (nfsd_serv->sv_nrthreads == 1) - svc_shutdown_net(nfsd_serv, net); - svc_destroy(nfsd_serv); + nfsd_destroy(net); mutex_unlock(&nfsd_mutex); return ret; } |