Skip to content

Commit 70ca72d

Browse files
Trond MyklebustSomasundaram Krishnasamy
authored andcommitted
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]> (cherry picked from commit abc1327) Orabug: 30513382 Signed-off-by: Dai Ngo <[email protected]> Reviewed-by: Calum Mackay <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]> Conflicts: net/sunrpc/xprt.c
1 parent 86b0789 commit 70ca72d

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

net/sunrpc/xprt.c

Lines changed: 1 addition & 36 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 void xprt_request_init(struct rpc_task *, struct rpc_xprt *);
70-
static void xprt_connect_status(struct rpc_task *task);
7170
static int __xprt_get_cong(struct rpc_xprt *, struct rpc_task *);
7271
static void __xprt_put_cong(struct rpc_xprt *, struct rpc_rqst *);
7372
static void xprt_destroy(struct rpc_xprt *xprt);
@@ -774,7 +773,7 @@ void xprt_connect(struct rpc_task *task)
774773
task->tk_rqstp->rq_bytes_sent = 0;
775774
task->tk_timeout = task->tk_rqstp->rq_timeout;
776775
task->tk_rqstp->rq_connect_cookie = xprt->connect_cookie;
777-
rpc_sleep_on(&xprt->pending, task, xprt_connect_status);
776+
rpc_sleep_on(&xprt->pending, task, NULL);
778777

779778
if (test_bit(XPRT_CLOSING, &xprt->state))
780779
return;
@@ -793,40 +792,6 @@ void xprt_connect(struct rpc_task *task)
793792
xprt_release_write(xprt, task);
794793
}
795794

796-
static void xprt_connect_status(struct rpc_task *task)
797-
{
798-
struct rpc_xprt *xprt = task->tk_rqstp->rq_xprt;
799-
800-
if (task->tk_status == 0) {
801-
xprt->stat.connect_count++;
802-
xprt->stat.connect_time += (long)jiffies - xprt->stat.connect_start;
803-
dprintk("RPC: %5u xprt_connect_status: connection established\n",
804-
task->tk_pid);
805-
return;
806-
}
807-
808-
switch (task->tk_status) {
809-
case -ECONNREFUSED:
810-
case -ECONNRESET:
811-
case -ECONNABORTED:
812-
case -ENETUNREACH:
813-
case -EHOSTUNREACH:
814-
case -EPIPE:
815-
case -EAGAIN:
816-
dprintk("RPC: %5u xprt_connect_status: retrying\n", task->tk_pid);
817-
break;
818-
case -ETIMEDOUT:
819-
dprintk("RPC: %5u xprt_connect_status: connect attempt timed "
820-
"out\n", task->tk_pid);
821-
break;
822-
default:
823-
dprintk("RPC: %5u xprt_connect_status: error %d connecting to "
824-
"server %s\n", task->tk_pid, -task->tk_status,
825-
xprt->servername);
826-
task->tk_status = -EIO;
827-
}
828-
}
829-
830795
/**
831796
* xprt_lookup_rqst - find an RPC request corresponding to an XID
832797
* @xprt: transport on which the original request was transmitted

0 commit comments

Comments
 (0)