From: Chuck Lever Date: Tue, 11 Sep 2007 22:00:52 +0000 (-0400) Subject: SUNRPC: RPC bind failures should be permanent for NULL requests X-Git-Tag: firefly_0821_release~25901^2~90 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b79dc8ced1412e7056f3969bef40a30cc75ee530;p=firefly-linux-kernel-4.4.55.git SUNRPC: RPC bind failures should be permanent for NULL requests The purpose of an RPC ping (a NULL request) is to determine whether the remote end is operating and supports the RPC program and version of the request. If we do an RPC bind and the remote's rpcbind service says "this program or service isn't supported" then we have our answer already, and we should give up immediately. This is good for the kernel mount client, as it will cause the request to fail, and then allow an immediate retry with different options. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 04f6e15457e0..b19bacf42564 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -959,6 +959,11 @@ call_bind_status(struct rpc_task *task) case -EACCES: dprintk("RPC: %5u remote rpcbind: RPC program/version " "unavailable\n", task->tk_pid); + /* fail immediately if this is an RPC ping */ + if (task->tk_msg.rpc_proc->p_proc == 0) { + status = -EOPNOTSUPP; + break; + } rpc_delay(task, 3*HZ); goto retry_timeout; case -ETIMEDOUT: