diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2013-08-09 12:49:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-09-03 15:26:37 -0400 |
commit | be05c860d79bd2688486e78a3b7a298543f0c6f1 (patch) | |
tree | fa06a31816c6651b0819507f3fb0b9d1b073d4fd /fs/nfs/nfs4proc.c | |
parent | fbd4bfd1d9d21664a1c2a6730e8bc1a577f1e171 (diff) |
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>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 5ad48f0ce841..0122919a311a 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -1610,10 +1610,20 @@ int nfs4_open_delegation_recall(struct nfs_open_context *ctx, struct nfs4_state | |||
1610 | return nfs4_handle_delegation_recall_error(server, state, stateid, err); | 1610 | return nfs4_handle_delegation_recall_error(server, state, stateid, err); |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | static void nfs4_open_confirm_prepare(struct rpc_task *task, void *calldata) | ||
1614 | { | ||
1615 | struct nfs4_opendata *data = calldata; | ||
1616 | |||
1617 | nfs40_setup_sequence(data->o_arg.server, &data->o_arg.seq_args, | ||
1618 | &data->o_res.seq_res, task); | ||
1619 | } | ||
1620 | |||
1613 | static void nfs4_open_confirm_done(struct rpc_task *task, void *calldata) | 1621 | static void nfs4_open_confirm_done(struct rpc_task *task, void *calldata) |
1614 | { | 1622 | { |
1615 | struct nfs4_opendata *data = calldata; | 1623 | struct nfs4_opendata *data = calldata; |
1616 | 1624 | ||
1625 | nfs40_sequence_done(task, &data->o_res.seq_res); | ||
1626 | |||
1617 | data->rpc_status = task->tk_status; | 1627 | data->rpc_status = task->tk_status; |
1618 | if (data->rpc_status == 0) { | 1628 | if (data->rpc_status == 0) { |
1619 | nfs4_stateid_copy(&data->o_res.stateid, &data->c_res.stateid); | 1629 | nfs4_stateid_copy(&data->o_res.stateid, &data->c_res.stateid); |
@@ -1642,6 +1652,7 @@ out_free: | |||
1642 | } | 1652 | } |
1643 | 1653 | ||
1644 | static const struct rpc_call_ops nfs4_open_confirm_ops = { | 1654 | static const struct rpc_call_ops nfs4_open_confirm_ops = { |
1655 | .rpc_call_prepare = nfs4_open_confirm_prepare, | ||
1645 | .rpc_call_done = nfs4_open_confirm_done, | 1656 | .rpc_call_done = nfs4_open_confirm_done, |
1646 | .rpc_release = nfs4_open_confirm_release, | 1657 | .rpc_release = nfs4_open_confirm_release, |
1647 | }; | 1658 | }; |
@@ -1669,6 +1680,7 @@ static int _nfs4_proc_open_confirm(struct nfs4_opendata *data) | |||
1669 | }; | 1680 | }; |
1670 | int status; | 1681 | int status; |
1671 | 1682 | ||
1683 | nfs4_init_sequence(&data->o_arg.seq_args, &data->o_res.seq_res, 1); | ||
1672 | kref_get(&data->kref); | 1684 | kref_get(&data->kref); |
1673 | data->rpc_done = 0; | 1685 | data->rpc_done = 0; |
1674 | data->rpc_status = 0; | 1686 | data->rpc_status = 0; |