@@ -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);