mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
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>
This commit is contained in:
parent
333ac786a1
commit
5decae1623
1 changed files with 1 additions and 3 deletions
|
@ -26,7 +26,6 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
|
||||||
struct cb_getattrargs *args = argp;
|
struct cb_getattrargs *args = argp;
|
||||||
struct cb_getattrres *res = resp;
|
struct cb_getattrres *res = resp;
|
||||||
struct nfs_delegation *delegation;
|
struct nfs_delegation *delegation;
|
||||||
struct nfs_inode *nfsi;
|
|
||||||
struct inode *inode;
|
struct inode *inode;
|
||||||
|
|
||||||
res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
|
res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
|
||||||
|
@ -47,9 +46,8 @@ __be32 nfs4_callback_getattr(void *argp, void *resp,
|
||||||
-ntohl(res->status));
|
-ntohl(res->status));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
nfsi = NFS_I(inode);
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
delegation = rcu_dereference(nfsi->delegation);
|
delegation = nfs4_get_valid_delegation(inode);
|
||||||
if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0)
|
if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0)
|
||||||
goto out_iput;
|
goto out_iput;
|
||||||
res->size = i_size_read(inode);
|
res->size = i_size_read(inode);
|
||||||
|
|
Loading…
Reference in a new issue