diff options
author | Dai Ngo <dai.ngo@oracle.com> | 2022-05-02 14:19:23 -0700 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-05-19 12:25:39 -0400 |
commit | d76cc46b37e123e8d245cc3490978dbda56f979d (patch) | |
tree | 166f6aabe26e70a841624f5307879a906a88e1c2 /fs/nfsd/nfsctl.c | |
parent | 3d69427151806656abf129342028f3f4e5e1fee0 (diff) | |
download | lwn-d76cc46b37e123e8d245cc3490978dbda56f979d.tar.gz lwn-d76cc46b37e123e8d245cc3490978dbda56f979d.zip |
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/nfsctl.c')
-rw-r--r-- | fs/nfsd/nfsctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index 16920e4512bd..322a208878f2 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c @@ -1544,6 +1544,9 @@ static int __init init_nfsd(void) retval = register_cld_notifier(); if (retval) goto out_free_all; + retval = nfsd4_create_laundry_wq(); + if (retval) + goto out_free_all; return 0; out_free_all: unregister_pernet_subsys(&nfsd_net_ops); @@ -1566,6 +1569,7 @@ out_free_slabs: static void __exit exit_nfsd(void) { + nfsd4_destroy_laundry_wq(); unregister_cld_notifier(); unregister_pernet_subsys(&nfsd_net_ops); nfsd_drc_slab_free(); |