Skip to content

Commit

Permalink
nfsd: Unregister the cld notifier when laundry_wq create failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zhang Xiaoxu authored and Chuck Lever committed May 23, 2022
1 parent 28df098 commit 62fdb65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62fdb65

Please sign in to comment.