aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/xprtsock.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r--net/sunrpc/xprtsock.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 4f55ab7ec1b1..9847c30b5001 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -548,8 +548,6 @@ static int xs_udp_send_request(struct rpc_task *task)
548 /* Still some bytes left; set up for a retry later. */ 548 /* Still some bytes left; set up for a retry later. */
549 status = -EAGAIN; 549 status = -EAGAIN;
550 } 550 }
551 if (!transport->sock)
552 goto out;
553 551
554 switch (status) { 552 switch (status) {
555 case -ENOTSOCK: 553 case -ENOTSOCK:
@@ -569,7 +567,7 @@ static int xs_udp_send_request(struct rpc_task *task)
569 * prompts ECONNREFUSED. */ 567 * prompts ECONNREFUSED. */
570 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags); 568 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
571 } 569 }
572out: 570
573 return status; 571 return status;
574} 572}
575 573
@@ -651,8 +649,6 @@ static int xs_tcp_send_request(struct rpc_task *task)
651 status = -EAGAIN; 649 status = -EAGAIN;
652 break; 650 break;
653 } 651 }
654 if (!transport->sock)
655 goto out;
656 652
657 switch (status) { 653 switch (status) {
658 case -ENOTSOCK: 654 case -ENOTSOCK:
@@ -672,7 +668,7 @@ static int xs_tcp_send_request(struct rpc_task *task)
672 case -ENOTCONN: 668 case -ENOTCONN:
673 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags); 669 clear_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags);
674 } 670 }
675out: 671
676 return status; 672 return status;
677} 673}
678 674
@@ -1911,6 +1907,11 @@ static void xs_tcp_setup_socket(struct rpc_xprt *xprt,
1911 case -EALREADY: 1907 case -EALREADY:
1912 xprt_clear_connecting(xprt); 1908 xprt_clear_connecting(xprt);
1913 return; 1909 return;
1910 case -EINVAL:
1911 /* Happens, for instance, if the user specified a link
1912 * local IPv6 address without a scope-id.
1913 */
1914 goto out;
1914 } 1915 }
1915out_eagain: 1916out_eagain:
1916 status = -EAGAIN; 1917 status = -EAGAIN;
@@ -2099,7 +2100,7 @@ static void xs_tcp_print_stats(struct rpc_xprt *xprt, struct seq_file *seq)
2099 * we allocate pages instead doing a kmalloc like rpc_malloc is because we want 2100 * we allocate pages instead doing a kmalloc like rpc_malloc is because we want
2100 * to use the server side send routines. 2101 * to use the server side send routines.
2101 */ 2102 */
2102void *bc_malloc(struct rpc_task *task, size_t size) 2103static void *bc_malloc(struct rpc_task *task, size_t size)
2103{ 2104{
2104 struct page *page; 2105 struct page *page;
2105 struct rpc_buffer *buf; 2106 struct rpc_buffer *buf;
@@ -2119,7 +2120,7 @@ void *bc_malloc(struct rpc_task *task, size_t size)
2119/* 2120/*
2120 * Free the space allocated in the bc_alloc routine 2121 * Free the space allocated in the bc_alloc routine
2121 */ 2122 */
2122void bc_free(void *buffer) 2123static void bc_free(void *buffer)
2123{ 2124{
2124 struct rpc_buffer *buf; 2125 struct rpc_buffer *buf;
2125 2126
@@ -2250,9 +2251,6 @@ static struct rpc_xprt_ops xs_tcp_ops = {
2250 .buf_free = rpc_free, 2251 .buf_free = rpc_free,
2251 .send_request = xs_tcp_send_request, 2252 .send_request = xs_tcp_send_request,
2252 .set_retrans_timeout = xprt_set_retrans_timeout_def, 2253 .set_retrans_timeout = xprt_set_retrans_timeout_def,
2253#if defined(CONFIG_NFS_V4_1)
2254 .release_request = bc_release_request,
2255#endif /* CONFIG_NFS_V4_1 */
2256 .close = xs_tcp_close, 2254 .close = xs_tcp_close,
2257 .destroy = xs_destroy, 2255 .destroy = xs_destroy,
2258 .print_stats = xs_tcp_print_stats, 2256 .print_stats = xs_tcp_print_stats,