mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
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 <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
1deed57235
commit
40e6aa10aa
@ -1796,7 +1796,7 @@ static void nfs4_return_incompatible_delegation(struct inode *inode, fmode_t fmo
|
||||
|
||||
fmode &= FMODE_READ|FMODE_WRITE;
|
||||
rcu_read_lock();
|
||||
delegation = rcu_dereference(NFS_I(inode)->delegation);
|
||||
delegation = nfs4_get_valid_delegation(inode);
|
||||
if (delegation == NULL || (delegation->type & fmode) == fmode) {
|
||||
rcu_read_unlock();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user