projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1deed57
)
NFSv4: nfs4_return_incompatible_delegation() should check delegation validity
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Sun, 27 Oct 2019 17:38:45 +0000
(13:38 -0400)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Mon, 4 Nov 2019 02:28:46 +0000
(21:28 -0500)
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>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index
a222122
..
c7e4a9b
100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-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;