diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-10-26 10:16:15 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-11-03 21:28:46 -0500 |
commit | 42c304c34e2d2c73d301b222418ac019918a1c59 (patch) | |
tree | 32e45e49335bf719ca273fdbe2cd9b8402ea056e /fs/nfs/delegation.c | |
parent | 3887ce1aac3a02df3d992cf82d0c644d26d64635 (diff) | |
download | lwn-42c304c34e2d2c73d301b222418ac019918a1c59.tar.gz lwn-42c304c34e2d2c73d301b222418ac019918a1c59.zip |
NFS: nfs_inode_find_state_and_recover() fix stateid matching
In nfs_inode_find_state_and_recover() we want to mark for recovery
only those stateids that match or are older than the supplied
stateid parameter.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs/delegation.c')
-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 e3d8055f0c6d..902baea1ecc6 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -1207,7 +1207,8 @@ void nfs_inode_find_delegation_state_and_recover(struct inode *inode, rcu_read_lock(); delegation = rcu_dereference(NFS_I(inode)->delegation); if (delegation && - nfs4_stateid_match_other(&delegation->stateid, stateid)) { + nfs4_stateid_match_or_older(&delegation->stateid, stateid) && + !test_bit(NFS_DELEGATION_REVOKED, &delegation->flags)) { nfs_mark_test_expired_delegation(NFS_SERVER(inode), delegation); found = true; } |