mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
NFS: Add nfs4_sequence calls for OPEN_CONFIRM
Ensure OPEN_CONFIRM is not emitted while the transport is plugged. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
fbd4bfd1d9
commit
be05c860d7
1 changed files with 12 additions and 0 deletions
|
@ -1610,10 +1610,20 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state
|
|||
return nfs4_handle_delegation_recall_error(server, state, stateid, err);
|
||||
}
|
||||
|
||||
static void nfs4_open_confirm_prepare(struct rpc_task *task, void *calldata)
|
||||
{
|
||||
struct nfs4_opendata *data = calldata;
|
||||
|
||||
nfs40_setup_sequence(data->o_arg.server, &data->o_arg.seq_args,
|
||||
&data->o_res.seq_res, task);
|
||||
}
|
||||
|
||||
static void nfs4_open_confirm_done(struct rpc_task *task, void *calldata)
|
||||
{
|
||||
struct nfs4_opendata *data = calldata;
|
||||
|
||||
nfs40_sequence_done(task, &data->o_res.seq_res);
|
||||
|
||||
data->rpc_status = task->tk_status;
|
||||
if (data->rpc_status == 0) {
|
||||
nfs4_stateid_copy(&data->o_res.stateid, &data->c_res.stateid);
|
||||
|
@ -1642,6 +1652,7 @@ static void nfs4_open_confirm_release(void *calldata)
|
|||
}
|
||||
|
||||
static const struct rpc_call_ops nfs4_open_confirm_ops = {
|
||||
.rpc_call_prepare = nfs4_open_confirm_prepare,
|
||||
.rpc_call_done = nfs4_open_confirm_done,
|
||||
.rpc_release = nfs4_open_confirm_release,
|
||||
};
|
||||
|
@ -1669,6 +1680,7 @@ static int _nfs4_proc_open_confirm(struct nfs4_opendata *data)
|
|||
};
|
||||
int status;
|
||||
|
||||
nfs4_init_sequence(&data->o_arg.seq_args, &data->o_res.seq_res, 1);
|
||||
kref_get(&data->kref);
|
||||
data->rpc_done = 0;
|
||||
data->rpc_status = 0;
|
||||
|
|
Loading…
Reference in a new issue