diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2017-02-05 02:57:07 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-02-17 22:26:00 +0100 |
commit | f7d1ddbe7648af7460d23688c8c131342eb43b3a (patch) | |
tree | fc2e10cdd756b1233e91594117cd6148bc84feb2 /fs/nfsd/nfs4callback.c | |
parent | nfsd/idmap: return nfserr_inval for 0-length names (diff) | |
download | linux-f7d1ddbe7648af7460d23688c8c131342eb43b3a.tar.xz 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/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) { |