From: Chuck Lever Date: Thu, 3 Dec 2009 20:58:56 +0000 (-0500) Subject: SUNRPC: soft connect semantics for UDP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a28becc35e5c8f1fabb707bcd8a473712653de6;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git SUNRPC: soft connect semantics for UDP Introduce soft connect behavior for UDP transports. In this case, a major timeout returns ETIMEDOUT instead of EIO. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 97931d9f8579..154034b675bd 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1380,6 +1380,10 @@ call_timeout(struct rpc_task *task) dprintk("RPC: %5u call_timeout (major)\n", task->tk_pid); task->tk_timeouts++; + if (RPC_IS_SOFTCONN(task)) { + rpc_exit(task, -ETIMEDOUT); + return; + } if (RPC_IS_SOFT(task)) { if (clnt->cl_chatty) printk(KERN_NOTICE "%s: server %s not responding, timed out\n",