From: Trond Myklebust Date: Tue, 22 Oct 2019 17:34:06 +0000 (-0400) Subject: NFSv4: fail nfs4_refresh_delegation_stateid() when the delegation was revoked X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b57562087b0473374de61a7cc8ea200c4e34d295;p=linux.git 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 --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index c34bb81d37e26..630167e243bec 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; }