Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 485f2251 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Ensure that call_connect times out correctly



When the server is unavailable due to a networking error, etc, we want
the RPC client to respect the timeout delays when attempting to reconnect.

Reported-by: default avatarNeil Brown <neilb@suse.de>
Fixes: 561ec160 (SUNRPC: call_connect_status should recheck bind..)
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent f7be7284
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -1798,10 +1798,6 @@ call_connect_status(struct rpc_task *task)
	trace_rpc_connect_status(task, status);
	task->tk_status = 0;
	switch (status) {
		/* if soft mounted, test if we've timed out */
	case -ETIMEDOUT:
		task->tk_action = call_timeout;
		return;
	case -ECONNREFUSED:
	case -ECONNRESET:
	case -ECONNABORTED:
@@ -1812,7 +1808,9 @@ call_connect_status(struct rpc_task *task)
		if (RPC_IS_SOFTCONN(task))
			break;
	case -EAGAIN:
		task->tk_action = call_bind;
		/* Check for timeouts before looping back to call_bind */
	case -ETIMEDOUT:
		task->tk_action = call_timeout;
		return;
	case 0:
		clnt->cl_stats->netreconn++;