summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsctl.c
diff options
context:
space:
mode:
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>2022-05-21 12:08:44 +0800
committerChuck Lever <chuck.lever@oracle.com>2022-05-23 11:06:29 -0400
commit62fdb65edb6c43306c774939001f3a00974832aa (patch)
treec64ef0dd3aeda5cc3682310f43c328a7611af41d /fs/nfsd/nfsctl.c
parent28df0988815f63e2af5e6718193c9f68681ad7ff (diff)
nfsd: Unregister the cld notifier when laundry_wq create failed
If laundry_wq create failed, the cld notifier should be unregistered. Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfsctl.c')
-rw-r--r--fs/nfsd/nfsctl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 322a208878f2..55949e60897d 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -1543,12 +1543,14 @@ static int __init init_nfsd(void)
goto out_free_filesystem;
retval = register_cld_notifier();
if (retval)
- goto out_free_all;
+ goto out_free_subsys;
retval = nfsd4_create_laundry_wq();
if (retval)
goto out_free_all;
return 0;
out_free_all:
+ unregister_cld_notifier();
+out_free_subsys:
unregister_pernet_subsys(&nfsd_net_ops);
out_free_filesystem:
unregister_filesystem(&nfsd_fs_type);