Skip to contentSkip to conversation

nfs: initiate returning delegation when reclaiming one that's been recalled

PATCH New Jeff Layton 1 participant 1 message Jul 5, 2018

Subsystems (2)
lore
Share & tools
lore

Jeff Layton

author maintainer
#0 lore raw

PATCH 1/1 nfs: initiate returning delegation when reclaiming one that's been recalled

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.

---
 fs/nfs/nfs4proc.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/nfs/nfs4proc.c +4 -0
index 6dd146885da9..bf454debd99a 100644
@@ -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);
 }
 
 /*
Signature · 1 line
2.17.1