aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-07-03 09:32:23 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-07-03 09:42:54 -0400
commitb5872f0c67edf3714dd46f04d73c3644f3addaf9 (patch)
tree6b5d00addc414b9d96788ed6d407e83ab1477610 /net
parent93aa6c7bbc4124c8361c26a8b2c5c40afb185619 (diff)
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: Neil Brown <neilb@suse.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtsock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index ee359fc7af16..44c1927b68c7 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -539,6 +539,7 @@ static int xs_local_send_request(struct rpc_task *task)
539 539
540 switch (status) { 540 switch (status) {
541 case -ENOBUFS: 541 case -ENOBUFS:
542 break;
542 case -EAGAIN: 543 case -EAGAIN:
543 status = xs_nospace(task); 544 status = xs_nospace(task);
544 break; 545 break;
@@ -692,7 +693,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
692 status = -ENOTCONN; 693 status = -ENOTCONN;
693 /* Should we call xs_close() here? */ 694 /* Should we call xs_close() here? */
694 break; 695 break;
695 case -ENOBUFS:
696 case -EAGAIN: 696 case -EAGAIN:
697 status = xs_nospace(task); 697 status = xs_nospace(task);
698 break; 698 break;
@@ -703,6 +703,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
703 case -ECONNREFUSED: 703 case -ECONNREFUSED:
704 case -ENOTCONN: 704 case -ENOTCONN:
705 case -EADDRINUSE: 705 case -EADDRINUSE:
706 case -ENOBUFS:
706 case -EPIPE: 707 case -EPIPE:
707 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags); 708 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
708 } 709 }