From: Bryan Schumaker <bjschuma@xxxxxxxxxx> This should simplify the code a bit since the rpc layer will handle the task properly, allowing us to remove the rpc_wait_for_completion_task() call. Signed-off-by: Bryan Schumaker <bjschuma@xxxxxxxxxx> --- fs/nfs/nfs4proc.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 537181c..a2efcae 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6157,7 +6157,7 @@ static const struct rpc_call_ops nfs41_sequence_privileged_ops = { }; static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred, - const struct rpc_call_ops *seq_ops) + const struct rpc_call_ops *seq_ops, int flags) { struct nfs4_sequence_data *calldata; struct rpc_message msg = { @@ -6168,7 +6168,7 @@ static struct rpc_task *_nfs41_proc_sequence(struct nfs_client *clp, struct rpc_ .rpc_client = clp->cl_rpcclient, .rpc_message = &msg, .callback_ops = seq_ops, - .flags = RPC_TASK_ASYNC | RPC_TASK_SOFT, + .flags = RPC_TASK_SOFT | flags, }; if (!atomic_inc_not_zero(&clp->cl_count)) @@ -6194,7 +6194,7 @@ static int nfs41_proc_async_sequence(struct nfs_client *clp, struct rpc_cred *cr if ((renew_flags & NFS4_RENEW_TIMEOUT) == 0) return 0; - task = _nfs41_proc_sequence(clp, cred, &nfs41_sequence_ops); + task = _nfs41_proc_sequence(clp, cred, &nfs41_sequence_ops, RPC_TASK_ASYNC); if (IS_ERR(task)) ret = PTR_ERR(task); else @@ -6208,19 +6208,16 @@ static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred) struct rpc_task *task; int ret; - task = _nfs41_proc_sequence(clp, cred, &nfs41_sequence_privileged_ops); + task = _nfs41_proc_sequence(clp, cred, &nfs41_sequence_privileged_ops, 0); if (IS_ERR(task)) { ret = PTR_ERR(task); goto out; } - ret = rpc_wait_for_completion_task(task); - if (!ret) { + if (task->tk_status == 0) { struct nfs4_sequence_res *res = task->tk_msg.rpc_resp; - - if (task->tk_status == 0) - nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags); - ret = task->tk_status; + nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags); } + ret = task->tk_status; rpc_put_task(task); out: dprintk("<-- %s status=%d\n", __func__, ret); -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html