Commit b5872f0c authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Don't confuse ENOBUFS with a write_space issue

ENOBUFS means that memory allocations are failing due to an actual
low memory situation. It should not be confused with being out of
socket buffer space.

Handle the problem by just punting to the delay in call_status.
Reported-by: default avatarNeil Brown <neilb@suse.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 93aa6c7b
...@@ -539,6 +539,7 @@ static int xs_local_send_request(struct rpc_task *task) ...@@ -539,6 +539,7 @@ static int xs_local_send_request(struct rpc_task *task)
switch (status) { switch (status) {
case -ENOBUFS: case -ENOBUFS:
break;
case -EAGAIN: case -EAGAIN:
status = xs_nospace(task); status = xs_nospace(task);
break; break;
...@@ -692,7 +693,6 @@ static int xs_tcp_send_request(struct rpc_task *task) ...@@ -692,7 +693,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
status = -ENOTCONN; status = -ENOTCONN;
/* Should we call xs_close() here? */ /* Should we call xs_close() here? */
break; break;
case -ENOBUFS:
case -EAGAIN: case -EAGAIN:
status = xs_nospace(task); status = xs_nospace(task);
break; break;
...@@ -703,6 +703,7 @@ static int xs_tcp_send_request(struct rpc_task *task) ...@@ -703,6 +703,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
case -ECONNREFUSED: case -ECONNREFUSED:
case -ENOTCONN: case -ENOTCONN:
case -EADDRINUSE: case -EADDRINUSE:
case -ENOBUFS:
case -EPIPE: case -EPIPE:
clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags); clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
} }
......
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