diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-10-22 13:34:06 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-11-03 21:28:45 -0500 |
commit | b57562087b0473374de61a7cc8ea200c4e34d295 (patch) | |
tree | b04ba82bfbdf18853e2345aed128a8bca75cfd5e /fs/nfs | |
parent | 457a50424bdde44fbd394ee459fdbfb9ffc4e412 (diff) | |
download | linux-stable-b57562087b0473374de61a7cc8ea200c4e34d295.tar.gz linux-stable-b57562087b0473374de61a7cc8ea200c4e34d295.tar.bz2 linux-stable-b57562087b0473374de61a7cc8ea200c4e34d295.zip |
NFSv4: fail nfs4_refresh_delegation_stateid() when the delegation was revoked
If the delegation was revoked, we don't want to retry the delegreturn.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/delegation.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index c34bb81d37e2..630167e243be 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1190,7 +1190,8 @@ bool nfs4_refresh_delegation_stateid(nfs4_stateid *dst, struct inode *inode) rcu_read_lock(); delegation = rcu_dereference(NFS_I(inode)->delegation); if (delegation != NULL && - nfs4_stateid_match_other(dst, &delegation->stateid)) { + nfs4_stateid_match_other(dst, &delegation->stateid) && + !test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) { dst->seqid = delegation->stateid.seqid; ret = true; } |