Commit f580dd04 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Report TCP errors to the caller

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 743c69e7
...@@ -677,9 +677,6 @@ static int xs_tcp_send_request(struct rpc_task *task) ...@@ -677,9 +677,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
dprintk("RPC: xs_tcp_send_request(%u) = %d\n", dprintk("RPC: xs_tcp_send_request(%u) = %d\n",
xdr->len - req->rq_bytes_sent, status); xdr->len - req->rq_bytes_sent, status);
if (unlikely(sent == 0 && status < 0))
break;
/* If we've sent the entire packet, immediately /* If we've sent the entire packet, immediately
* reset the count of bytes sent. */ * reset the count of bytes sent. */
req->rq_bytes_sent += sent; req->rq_bytes_sent += sent;
...@@ -689,11 +686,13 @@ static int xs_tcp_send_request(struct rpc_task *task) ...@@ -689,11 +686,13 @@ static int xs_tcp_send_request(struct rpc_task *task)
return 0; return 0;
} }
if (sent != 0) if (status < 0)
continue; break;
if (sent == 0) {
status = -EAGAIN; status = -EAGAIN;
break; break;
} }
}
if (status == -EAGAIN && sk_stream_is_writeable(transport->inet)) if (status == -EAGAIN && sk_stream_is_writeable(transport->inet))
status = -ENOBUFS; status = -ENOBUFS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment