diff options
author | Kinglong Mee | 2017-02-05 09:57:07 +0800 |
---|---|---|
committer | J. Bruce Fields | 2017-02-17 16:26:00 -0500 |
commit | f7d1ddbe7648af7460d23688c8c131342eb43b3a (patch) | |
tree | fc2e10cdd756b1233e91594117cd6148bc84feb2 /fs/nfsd/nfs4callback.c | |
parent | c3821b3497aae1752cb2be72c32f650ef24c8820 (diff) |
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/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index eb78109d666c..fb6ca0ace9b1 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -753,6 +753,14 @@ int set_callback_cred(void) return 0; } +void cleanup_callback_cred(void) +{ + if (callback_cred) { + put_rpccred(callback_cred); + callback_cred = NULL; + } +} + static struct rpc_cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc_clnt *client, struct nfsd4_session *ses) { if (clp->cl_minorversion == 0) { |