]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nfs: initiate returning delegation when reclaiming one that's been recalled
authorJeff Layton <jlayton@kernel.org>
Thu, 5 Jul 2018 09:48:14 +0000 (05:48 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 30 Jul 2018 17:19:40 +0000 (13:19 -0400)
When reclaiming a delegation via CLAIM_PREVIOUS open, the server can
indicate that the delegation has been recalled since it was issued by
setting the "recalled" flag in the delegation.

Ensure that we respect the flag by initiating a delegation return when
it is set.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 5a8190ec31a236e4d269745eefd5aabb141108a1..3b28c0ac10bc6ae3c8295878f5b8eccc469bc49c 100644 (file)
@@ -1773,6 +1773,10 @@ nfs4_opendata_check_deleg(struct nfs4_opendata *data, struct nfs4_state *state)
                                data->o_res.delegation_type,
                                &data->o_res.delegation,
                                data->o_res.pagemod_limit);
+
+       if (data->o_res.do_recall)
+               nfs_async_inode_return_delegation(state->inode,
+                                                 &data->o_res.delegation);
 }
 
 /*