diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-10-27 20:38:45 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-11-04 05:28:46 +0300 |
commit | 40e6aa10aaf233b58db319e77a6a05ed633e107c (patch) | |
tree | 4115b2aa2ae83bd01bb309e46e34d17d221a3895 | |
parent | 1deed572351806322c3d9af005c2cf931ff23174 (diff) | |
download | linux-40e6aa10aaf233b58db319e77a6a05ed633e107c.tar.xz |
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>
-rw-r--r-- | fs/nfs/nfs4proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a222122e7151..c7e4a9ba8420 100644 --- 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; |