diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-02-05 09:57:07 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-02-17 16:26:00 -0500 |
commit | f7d1ddbe7648af7460d23688c8c131342eb43b3a (patch) | |
tree | fc2e10cdd756b1233e91594117cd6148bc84feb2 /fs/nfsd/nfs4state.c | |
parent | c3821b3497aae1752cb2be72c32f650ef24c8820 (diff) | |
download | linux-f7d1ddbe7648af7460d23688c8c131342eb43b3a.tar.gz linux-f7d1ddbe7648af7460d23688c8c131342eb43b3a.tar.bz2 linux-f7d1ddbe7648af7460d23688c8c131342eb43b3a.zip |
nfsd/callback: Cleanup callback cred on shutdown
The rpccred gotten from rpc_lookup_machine_cred() should be put when
state is shutdown.
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a0dee8ae9f97..d35eb077330f 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -7012,23 +7012,24 @@ nfs4_state_start(void) ret = set_callback_cred(); if (ret) - return -ENOMEM; + return ret; + laundry_wq = alloc_workqueue("%s", WQ_UNBOUND, 0, "nfsd4"); if (laundry_wq == NULL) { ret = -ENOMEM; - goto out_recovery; + goto out_cleanup_cred; } ret = nfsd4_create_callback_queue(); if (ret) goto out_free_laundry; set_max_delegations(); - return 0; out_free_laundry: destroy_workqueue(laundry_wq); -out_recovery: +out_cleanup_cred: + cleanup_callback_cred(); return ret; } @@ -7086,6 +7087,7 @@ nfs4_state_shutdown(void) { destroy_workqueue(laundry_wq); nfsd4_destroy_callback_queue(); + cleanup_callback_cred(); } static void |