diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-07-03 16:46:41 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-02 10:30:38 -0700 |
commit | 6a4ebdb6be2ac2ad0e03ca9131573a1f0eadd7d5 (patch) | |
tree | 4b6a848f3d11189a33aff9b49ea942bfa1cd5d67 /fs/nfsd/nfsd.h | |
parent | 1d22d5660b961c6b36fa361e1e394f64b068c763 (diff) | |
download | linux-3.10-6a4ebdb6be2ac2ad0e03ca9131573a1f0eadd7d5.tar.gz linux-3.10-6a4ebdb6be2ac2ad0e03ca9131573a1f0eadd7d5.tar.bz2 linux-3.10-6a4ebdb6be2ac2ad0e03ca9131573a1f0eadd7d5.zip |
NFSd: introduce nfsd_destroy() helper
commit 19f7e2ca44dfc3c1b3f499fc46801f98d403500f upstream.
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/nfsd/nfsd.h')
-rw-r--r-- | fs/nfsd/nfsd.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h index 1671429ffa6..e3339ca2b65 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h @@ -73,6 +73,15 @@ int nfsd_nrpools(void); int nfsd_get_nrthreads(int n, int *); int nfsd_set_nrthreads(int n, int *); +static inline void nfsd_destroy(struct net *net) +{ + int destroy = (nfsd_serv->sv_nrthreads == 1); + + if (destroy) + svc_shutdown_net(nfsd_serv, net); + svc_destroy(nfsd_serv); +} + #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) #ifdef CONFIG_NFSD_V2_ACL extern struct svc_version nfsd_acl_version2; |