summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsd.h
diff options
context:
space:
mode:
authorDai Ngo <dai.ngo@oracle.com>2022-05-03 00:19:23 +0300
committerChuck Lever <chuck.lever@oracle.com>2022-05-19 19:25:39 +0300
commitd76cc46b37e123e8d245cc3490978dbda56f979d (patch)
tree166f6aabe26e70a841624f5307879a906a88e1c2 /fs/nfsd/nfsd.h
parent3d69427151806656abf129342028f3f4e5e1fee0 (diff)
downloadlinux-d76cc46b37e123e8d245cc3490978dbda56f979d.tar.xz
NFSD: move create/destroy of laundry_wq to init_nfsd and exit_nfsd
This patch moves create/destroy of laundry_wq from nfs4_state_start and nfs4_state_shutdown_net to init_nfsd and exit_nfsd to prevent the laundromat from being freed while a thread is processing a conflicting lock. Reviewed-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Dai Ngo <dai.ngo@oracle.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfsd.h')
-rw-r--r--fs/nfsd/nfsd.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 23996c6ca75e..847b482155ae 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -162,6 +162,8 @@ void nfs4_state_shutdown_net(struct net *net);
int nfs4_reset_recoverydir(char *recdir);
char * nfs4_recoverydir(void);
bool nfsd4_spo_must_allow(struct svc_rqst *rqstp);
+int nfsd4_create_laundry_wq(void);
+void nfsd4_destroy_laundry_wq(void);
#else
static inline int nfsd4_init_slabs(void) { return 0; }
static inline void nfsd4_free_slabs(void) { }
@@ -175,6 +177,8 @@ static inline bool nfsd4_spo_must_allow(struct svc_rqst *rqstp)
{
return false;
}
+static inline int nfsd4_create_laundry_wq(void) { return 0; };
+static inline void nfsd4_destroy_laundry_wq(void) {};
#endif
/*