summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-10-22 08:35:57 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-11-03 21:28:45 -0500
commit5decae1623f5a1e409ed6befdc7c03ce53e8cd09 (patch)
tree77aa7cd6f578691726ceabeb33f8a3ad4ecab664 /fs/nfs
parent333ac786a1b4a366da9830f550ba440e398bb5a5 (diff)
downloadtalos-op-linux-5decae1623f5a1e409ed6befdc7c03ce53e8cd09.tar.gz
talos-op-linux-5decae1623f5a1e409ed6befdc7c03ce53e8cd09.zip
NFSv4: nfs4_callback_getattr() should ignore revoked delegations
If the delegation has been revoked, ignore it. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/callback_proc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index db3e7771e597..cd4c6bc81cae 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -26,7 +26,6 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
struct cb_getattrargs *args = argp;
struct cb_getattrres *res = resp;
struct nfs_delegation *delegation;
- struct nfs_inode *nfsi;
struct inode *inode;
res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
@@ -47,9 +46,8 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
-ntohl(res->status));
goto out;
}
- nfsi = NFS_I(inode);
rcu_read_lock();
- delegation = rcu_dereference(nfsi->delegation);
+ delegation = nfs4_get_valid_delegation(inode);
if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0)
goto out_iput;
res->size = i_size_read(inode);
OpenPOWER on IntegriCloud