If the delegation has been revoked, ignore it. Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx> --- fs/nfs/callback_proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index db3e7771e597..58a77c41ff36 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -50,7 +50,7 @@ __be32 nfs4_callback_getattr(void *argp, void *resp, nfsi = NFS_I(inode); rcu_read_lock(); delegation = rcu_dereference(nfsi->delegation); - if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0) + if (!nfs4_is_valid_delegation(delegation, FMODE_WRITE)) goto out_iput; res->size = i_size_read(inode); res->change_attr = delegation->change_attr; -- 2.21.0