Skip to content

Commit

Permalink
NFSv4: Don't report revoked delegations as valid in nfs_have_delegati…
Browse files Browse the repository at this point in the history
…on()

If the delegation is revoked, then it can't be used for caching.

Fixes: 869f9df ("NFSv4: Fix races between nfs_remove_bad_delegation()...")
Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected] # v3.19+
Tested-by: Oleg Drokin <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
trondmypd authored and amschuma-ntap committed Sep 27, 2016
1 parent 7dc72d5 commit b3f9e72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/delegation.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ nfs4_do_check_delegation(struct inode *inode, fmode_t flags, bool mark)
rcu_read_lock();
delegation = rcu_dereference(NFS_I(inode)->delegation);
if (delegation != NULL && (delegation->type & flags) == flags &&
!test_bit(NFS_DELEGATION_REVOKED, &delegation->flags) &&
!test_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
if (mark)
nfs_mark_delegation_referenced(delegation);
Expand Down

0 comments on commit b3f9e72

Please sign in to comment.