SUNRPC: Don't confuse ENOBUFS with a write_space issue
authorTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 3 Jul 2015 13:32:23 +0000 (09:32 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 3 Jul 2015 13:42:54 +0000 (09:42 -0400)
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: Neil Brown <neilb@suse.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtsock.c

index ee359fc7af16feda2d5ed0f29ea55f907fc629df..44c1927b68c7b50bd9645bdd04dcc78dd1b338a5 100644 (file)
@@ -539,6 +539,7 @@ static int xs_local_send_request(struct rpc_task *task)
 
        switch (status) {
        case -ENOBUFS:
+               break;
        case -EAGAIN:
                status = xs_nospace(task);
                break;
@@ -692,7 +693,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
                status = -ENOTCONN;
                /* Should we call xs_close() here? */
                break;
-       case -ENOBUFS:
        case -EAGAIN:
                status = xs_nospace(task);
                break;
@@ -703,6 +703,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
        case -ECONNREFUSED:
        case -ENOTCONN:
        case -EADDRINUSE:
+       case -ENOBUFS:
        case -EPIPE:
                clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
        }