diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-16 16:51:38 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-04-19 16:55:05 -0400 |
commit | 06b4b681ababc20596aa947595714710f557131d (patch) | |
tree | 84a437ee1922b63931075faf389db87650e0ca79 /net | |
parent | d2b831416365e8b1f27809b62d5e4260883956cc (diff) |
SUNRPC: remove XS_SENDMSG_RETRY
The condition for exiting from the loop in xs_tcp_send_request() should be
that we find we're not making progress (i.e. number of bytes sent is 0).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
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 4c2462e2f2b..4a567a93e6a 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) { |