Commit b4410c2f authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.1: Fix the handling of the SEQUENCE status bits

We want SEQUENCE status bits to be handled by the state manager in order
to avoid threading issues.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0400a6b0
...@@ -436,8 +436,8 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res * ...@@ -436,8 +436,8 @@ static int nfs41_sequence_done(struct rpc_task *task, struct nfs4_sequence_res *
clp = res->sr_session->clp; clp = res->sr_session->clp;
do_renew_lease(clp, timestamp); do_renew_lease(clp, timestamp);
/* Check sequence flags */ /* Check sequence flags */
if (atomic_read(&clp->cl_count) > 1) if (res->sr_status_flags != 0)
nfs41_handle_sequence_flag_errors(clp, res->sr_status_flags); nfs4_schedule_lease_recovery(clp);
break; break;
case -NFS4ERR_DELAY: case -NFS4ERR_DELAY:
/* The server detected a resend of the RPC call and /* The server detected a resend of the RPC call and
...@@ -5254,8 +5254,13 @@ static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred) ...@@ -5254,8 +5254,13 @@ static int nfs4_proc_sequence(struct nfs_client *clp, struct rpc_cred *cred)
goto out; goto out;
} }
ret = rpc_wait_for_completion_task(task); ret = rpc_wait_for_completion_task(task);
if (!ret) if (!ret) {
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; ret = task->tk_status;
}
rpc_put_task(task); rpc_put_task(task);
out: out:
dprintk("<-- %s status=%d\n", __func__, ret); dprintk("<-- %s status=%d\n", __func__, ret);
......
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