@@ -1923,8 +1923,16 @@ static void nfs4_open_done(struct rpc_task *task, void *calldata)
renew_lease(data->o_res.server, data->timestamp);
if (!(data->o_res.rflags & NFS4_OPEN_RESULT_CONFIRM))
nfs_confirm_seqid(&data->owner->so_seqid, 0);
+
+ if (nfs4_stateid_is_newer(&data->state->open_stateid, &data->o_res.stateid) &&
+ !can_open_cached(data->state, data->o_arg.fmode, data->o_arg.open_flags)) {
+ rpc_restart_call_prepare(task);
+ goto out;
+ }
}
data->rpc_done = 1;
+out:
+ return;
}
static void nfs4_open_release(void *calldata)