diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-07-03 08:46:41 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2012-07-25 09:21:30 -0400 |
commit | 19f7e2ca44dfc3c1b3f499fc46801f98d403500f (patch) | |
tree | 765d6e60ace4a723f5e0b8e393728b1a92bcd863 /fs/nfsd/nfsd.h | |
parent | a007c4c3e943ecc054a806c259d95420a188754b (diff) |
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/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 6d425c2f9fcd..7b248a24d5c5 100644 --- a/fs/nfsd/nfsd.h +++ b/fs/nfsd/nfsd.h | |||
@@ -75,6 +75,15 @@ int nfsd_set_nrthreads(int n, int *); | |||
75 | int nfsd_pool_stats_open(struct inode *, struct file *); | 75 | int nfsd_pool_stats_open(struct inode *, struct file *); |
76 | int nfsd_pool_stats_release(struct inode *, struct file *); | 76 | int nfsd_pool_stats_release(struct inode *, struct file *); |
77 | 77 | ||
78 | static inline void nfsd_destroy(struct net *net) | ||
79 | { | ||
80 | int destroy = (nfsd_serv->sv_nrthreads == 1); | ||
81 | |||
82 | if (destroy) | ||
83 | svc_shutdown_net(nfsd_serv, net); | ||
84 | svc_destroy(nfsd_serv); | ||
85 | } | ||
86 | |||
78 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) | 87 | #if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL) |
79 | #ifdef CONFIG_NFSD_V2_ACL | 88 | #ifdef CONFIG_NFSD_V2_ACL |
80 | extern struct svc_version nfsd_acl_version2; | 89 | extern struct svc_version nfsd_acl_version2; |