diff options
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 5cbb404c4cd..a71fefd6191 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -467,7 +467,7 @@ static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, | |||
467 | int err, sent = 0; | 467 | int err, sent = 0; |
468 | 468 | ||
469 | if (unlikely(!sock)) | 469 | if (unlikely(!sock)) |
470 | return -ENOTCONN; | 470 | return -ENOTSOCK; |
471 | 471 | ||
472 | clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags); | 472 | clear_bit(SOCK_ASYNC_NOSPACE, &sock->flags); |
473 | if (base != 0) { | 473 | if (base != 0) { |
@@ -594,6 +594,10 @@ static int xs_udp_send_request(struct rpc_task *task) | |||
594 | } | 594 | } |
595 | 595 | ||
596 | switch (status) { | 596 | switch (status) { |
597 | case -ENOTSOCK: | ||
598 | status = -ENOTCONN; | ||
599 | /* Should we call xs_close() here? */ | ||
600 | break; | ||
597 | case -EAGAIN: | 601 | case -EAGAIN: |
598 | xs_nospace(task); | 602 | xs_nospace(task); |
599 | break; | 603 | break; |
@@ -693,6 +697,10 @@ static int xs_tcp_send_request(struct rpc_task *task) | |||
693 | } | 697 | } |
694 | 698 | ||
695 | switch (status) { | 699 | switch (status) { |
700 | case -ENOTSOCK: | ||
701 | status = -ENOTCONN; | ||
702 | /* Should we call xs_close() here? */ | ||
703 | break; | ||
696 | case -EAGAIN: | 704 | case -EAGAIN: |
697 | xs_nospace(task); | 705 | xs_nospace(task); |
698 | break; | 706 | break; |