Skip to content

Commit abc1327

Browse files
author
Trond Myklebust
committed
SUNRPC: Remove xprt_connect_status()
Over the years, xprt_connect_status() has been superseded by call_connect_status(), which now handles all the errors that xprt_connect_status() does and more. Since the latter converts all errors that it doesn't recognise to EIO, then it is time for it to be retired. Reported-by: Chuck Lever <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Tested-by: Chuck Lever <[email protected]>
1 parent cf76785 commit abc1327

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

net/sunrpc/xprt.c

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@
6767
*/
6868
static void xprt_init(struct rpc_xprt *xprt, struct net *net);
6969
static __be32 xprt_alloc_xid(struct rpc_xprt *xprt);
70-
static void xprt_connect_status(struct rpc_task *task);
7170
static void xprt_destroy(struct rpc_xprt *xprt);
7271

7372
static DEFINE_SPINLOCK(xprt_list_lock);
@@ -822,7 +821,7 @@ void xprt_connect(struct rpc_task *task)
822821
if (!xprt_connected(xprt)) {
823822
task->tk_timeout = task->tk_rqstp->rq_timeout;
824823
task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;
825-
rpc_sleep_on(&xprt->pending, task, xprt_connect_status);
824+
rpc_sleep_on(&xprt->pending, task, NULL);
826825

827826
if (test_bit(XPRT_CLOSING, &xprt->state))
828827
return;
@@ -841,35 +840,6 @@ void xprt_connect(struct rpc_task *task)
841840
xprt_release_write(xprt, task);
842841
}
843842

844-
static void xprt_connect_status(struct rpc_task *task)
845-
{
846-
switch (task->tk_status) {
847-
case 0:
848-
dprintk("RPC: %5u xprt_connect_status: connection established\n",
849-
task->tk_pid);
850-
break;
851-
case -ECONNREFUSED:
852-
case -ECONNRESET:
853-
case -ECONNABORTED:
854-
case -ENETUNREACH:
855-
case -EHOSTUNREACH:
856-
case -EPIPE:
857-
case -ENOTCONN:
858-
case -EAGAIN:
859-
dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
860-
break;
861-
case -ETIMEDOUT:
862-
dprintk("RPC: %5u xprt_connect_status: connect attempt timed "
863-
"out\n", task->tk_pid);
864-
break;
865-
default:
866-
dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
867-
"server %s\n", task->tk_pid, -task->tk_status,
868-
task->tk_rqstp->rq_xprt->servername);
869-
task->tk_status = -EIO;
870-
}
871-
}
872-
873843
enum xprt_xid_rb_cmp {
874844
XID_RB_EQUAL,
875845
XID_RB_LEFT,

0 commit comments

Comments
 (0)