NFS: Fix up nfs_ctx_key_to_expire()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 10 Jul 2021 22:07:14 +0000 (18:07 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 4 Oct 2021 00:49:05 +0000 (20:49 -0400)
commitca05cbae2a0468e5d78e9b4605936a8bf5da328b
treebd06e45fe70eb94249052670f024a9cec272ca8e
parent9019fb391de02cbff422090768b73afe9f6174df
NFS: Fix up nfs_ctx_key_to_expire()

If the cached credential exists but doesn't have any expiration callback
then exit early.
Fix up atomicity issues when replacing the credential with a new one
since the existing code could lead to refcount leaks.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/inode.c
fs/nfs/write.c
include/linux/nfs_fs.h