Skip to content

Commit 6cec3a8

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: 30513391 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 ea9367c commit 6cec3a8

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;
@@ -786,40 +785,6 @@ void xprt_connect(struct rpc_task *task)
786785
xprt_release_write(xprt, task);
787786
}
788787

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

0 commit comments

Comments
 (0)