aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/clnt.c4
-rw-r--r--net/sunrpc/xprt.c10
2 files changed, 4 insertions, 10 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 6d7221fe990a..396cdbe249d1 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -1046,6 +1046,8 @@ call_status(struct rpc_task *task)
1046 rpc_delay(task, 3*HZ); 1046 rpc_delay(task, 3*HZ);
1047 case -ETIMEDOUT: 1047 case -ETIMEDOUT:
1048 task->tk_action = call_timeout; 1048 task->tk_action = call_timeout;
1049 if (task->tk_client->cl_discrtry)
1050 xprt_disconnect(task->tk_xprt);
1049 break; 1051 break;
1050 case -ECONNREFUSED: 1052 case -ECONNREFUSED:
1051 case -ENOTCONN: 1053 case -ENOTCONN:
@@ -1169,6 +1171,8 @@ call_decode(struct rpc_task *task)
1169out_retry: 1171out_retry:
1170 req->rq_received = req->rq_private_buf.len = 0; 1172 req->rq_received = req->rq_private_buf.len = 0;
1171 task->tk_status = 0; 1173 task->tk_status = 0;
1174 if (task->tk_client->cl_discrtry)
1175 xprt_disconnect(task->tk_xprt);
1172} 1176}
1173 1177
1174/* 1178/*
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index ee6ffa01dfb1..456a14510308 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -735,16 +735,6 @@ void xprt_transmit(struct rpc_task *task)
735 xprt_reset_majortimeo(req); 735 xprt_reset_majortimeo(req);
736 /* Turn off autodisconnect */ 736 /* Turn off autodisconnect */
737 del_singleshot_timer_sync(&xprt->timer); 737 del_singleshot_timer_sync(&xprt->timer);
738 } else {
739 /* If all request bytes have been sent,
740 * then we must be retransmitting this one */
741 if (!req->rq_bytes_sent) {
742 if (task->tk_client->cl_discrtry) {
743 xprt_disconnect(xprt);
744 task->tk_status = -ENOTCONN;
745 return;
746 }
747 }
748 } 738 }
749 } else if (!req->rq_bytes_sent) 739 } else if (!req->rq_bytes_sent)
750 return; 740 return;