Commit c1dffe0b authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1: Reinitialise sequence results before retransmitting a request

If we have to retransmit a request, we should ensure that we reinitialise
the sequence results structure, since in the event of a signal
we need to treat the request as if it had not been sent.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org
parent a73881c9
......@@ -945,6 +945,13 @@ EXPORT_SYMBOL_GPL(nfs4_sequence_done);
#endif /* !CONFIG_NFS_V4_1 */
static void nfs41_sequence_res_init(struct nfs4_sequence_res *res)
{
res->sr_timestamp = jiffies;
res->sr_status_flags = 0;
res->sr_status = 1;
}
static
void nfs4_sequence_attach_slot(struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res,
......@@ -956,10 +963,6 @@ void nfs4_sequence_attach_slot(struct nfs4_sequence_args *args,
args->sa_slot = slot;
res->sr_slot = slot;
res->sr_timestamp = jiffies;
res->sr_status_flags = 0;
res->sr_status = 1;
}
int nfs4_setup_sequence(struct nfs_client *client,
......@@ -998,6 +1001,7 @@ int nfs4_setup_sequence(struct nfs_client *client,
trace_nfs4_setup_sequence(session, args);
out_start:
nfs41_sequence_res_init(res);
rpc_call_start(task);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment