From: Trond Myklebust Date: Tue, 22 Oct 2019 12:35:57 +0000 (-0400) Subject: NFSv4: nfs4_callback_getattr() should ignore revoked delegations X-Git-Tag: v5.10.7~3675^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5decae1623f5a1e409ed6befdc7c03ce53e8cd09;p=platform%2Fkernel%2Flinux-rpi.git NFSv4: nfs4_callback_getattr() should ignore revoked delegations If the delegation has been revoked, ignore it. Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index db3e777..cd4c6bc 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);