Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f580dd04 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Report TCP errors to the caller

parent 743c69e7
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -677,9 +677,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
		dprintk("RPC:       xs_tcp_send_request(%u) = %d\n",
				xdr->len - req->rq_bytes_sent, status);

		if (unlikely(sent == 0 && status < 0))
			break;

		/* If we've sent the entire packet, immediately
		 * reset the count of bytes sent. */
		req->rq_bytes_sent += sent;
@@ -689,11 +686,13 @@ static int xs_tcp_send_request(struct rpc_task *task)
			return 0;
		}

		if (sent != 0)
			continue;
		if (status < 0)
			break;
		if (sent == 0) {
			status = -EAGAIN;
			break;
		}
	}
	if (status == -EAGAIN && sk_stream_is_writeable(transport->inet))
		status = -ENOBUFS;