diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtsock.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 4c2462e2f2b2..4a567a93e6ad 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -136,12 +136,6 @@ static ctl_table sunrpc_table[] = { | |||
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * How many times to try sending a request on a socket before waiting | ||
140 | * for the socket buffer to clear. | ||
141 | */ | ||
142 | #define XS_SENDMSG_RETRY (10U) | ||
143 | |||
144 | /* | ||
145 | * Time out for an RPC UDP socket connect. UDP socket connects are | 139 | * Time out for an RPC UDP socket connect. UDP socket connects are |
146 | * synchronous, but we set a timeout anyway in case of resource | 140 | * synchronous, but we set a timeout anyway in case of resource |
147 | * exhaustion on the local host. | 141 | * exhaustion on the local host. |
@@ -666,7 +660,6 @@ static int xs_tcp_send_request(struct rpc_task *task) | |||
666 | struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); | 660 | struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); |
667 | struct xdr_buf *xdr = &req->rq_snd_buf; | 661 | struct xdr_buf *xdr = &req->rq_snd_buf; |
668 | int status; | 662 | int status; |
669 | unsigned int retry = 0; | ||
670 | 663 | ||
671 | xs_encode_tcp_record_marker(&req->rq_snd_buf); | 664 | xs_encode_tcp_record_marker(&req->rq_snd_buf); |
672 | 665 | ||
@@ -697,9 +690,10 @@ static int xs_tcp_send_request(struct rpc_task *task) | |||
697 | return 0; | 690 | return 0; |
698 | } | 691 | } |
699 | 692 | ||
693 | if (status != 0) | ||
694 | continue; | ||
700 | status = -EAGAIN; | 695 | status = -EAGAIN; |
701 | if (retry++ > XS_SENDMSG_RETRY) | 696 | break; |
702 | break; | ||
703 | } | 697 | } |
704 | 698 | ||
705 | switch (status) { | 699 | switch (status) { |