Commit f1478c13 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

NFS: Re-use exit code in nfs4_async_handle_error()

Clean up.
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent c9fdeb28
...@@ -4750,19 +4750,15 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, ...@@ -4750,19 +4750,15 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
dprintk("%s ERROR %d, Reset session\n", __func__, dprintk("%s ERROR %d, Reset session\n", __func__,
task->tk_status); task->tk_status);
nfs4_schedule_session_recovery(clp->cl_session, task->tk_status); nfs4_schedule_session_recovery(clp->cl_session, task->tk_status);
task->tk_status = 0; goto restart_call;
return -EAGAIN;
#endif /* CONFIG_NFS_V4_1 */ #endif /* CONFIG_NFS_V4_1 */
case -NFS4ERR_DELAY: case -NFS4ERR_DELAY:
nfs_inc_server_stats(server, NFSIOS_DELAY); nfs_inc_server_stats(server, NFSIOS_DELAY);
case -NFS4ERR_GRACE: case -NFS4ERR_GRACE:
rpc_delay(task, NFS4_POLL_RETRY_MAX); rpc_delay(task, NFS4_POLL_RETRY_MAX);
task->tk_status = 0;
return -EAGAIN;
case -NFS4ERR_RETRY_UNCACHED_REP: case -NFS4ERR_RETRY_UNCACHED_REP:
case -NFS4ERR_OLD_STATEID: case -NFS4ERR_OLD_STATEID:
task->tk_status = 0; goto restart_call;
return -EAGAIN;
} }
task->tk_status = nfs4_map_errors(task->tk_status); task->tk_status = nfs4_map_errors(task->tk_status);
return 0; return 0;
...@@ -4773,6 +4769,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server, ...@@ -4773,6 +4769,7 @@ nfs4_async_handle_error(struct rpc_task *task, const struct nfs_server *server,
rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL);
if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0) if (test_bit(NFS4CLNT_MANAGER_RUNNING, &clp->cl_state) == 0)
rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task);
restart_call:
task->tk_status = 0; task->tk_status = 0;
return -EAGAIN; return -EAGAIN;
} }
......
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