Skip to content

Commit 40e6aa1

Browse files
author
Trond Myklebust
committed
NFSv4: nfs4_return_incompatible_delegation() should check delegation validity
Ensure that we check that the delegation is valid in nfs4_return_incompatible_delegation() before we try to return it. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 1deed57 commit 40e6aa1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/nfs4proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmo
17961796

17971797
fmode &= FMODE_READ|FMODE_WRITE;
17981798
rcu_read_lock();
1799-
delegation = rcu_dereference(NFS_I(inode)->delegation);
1799+
delegation = nfs4_get_valid_delegation(inode);
18001800
if (delegation == NULL || (delegation->type & fmode) == fmode) {
18011801
rcu_read_unlock();
18021802
return;

0 commit comments

Comments
 (0)