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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index a2dddec5325e..cd7c18b24527 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1227,7 +1227,7 @@ static void xs_set_port(struct rpc_xprt *xprt, unsigned short port)
1227 } 1227 }
1228} 1228}
1229 1229
1230static int xs_bind(struct sock_xprt *transport, struct socket *sock) 1230static int xs_bind4(struct sock_xprt *transport, struct socket *sock)
1231{ 1231{
1232 struct sockaddr_in myaddr = { 1232 struct sockaddr_in myaddr = {
1233 .sin_family = AF_INET, 1233 .sin_family = AF_INET,
@@ -1255,8 +1255,9 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock)
1255 else 1255 else
1256 port--; 1256 port--;
1257 } while (err == -EADDRINUSE && port != transport->port); 1257 } while (err == -EADDRINUSE && port != transport->port);
1258 dprintk("RPC: xs_bind "NIPQUAD_FMT":%u: %s (%d)\n", 1258 dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n",
1259 NIPQUAD(myaddr.sin_addr), port, err ? "failed" : "ok", err); 1259 __FUNCTION__, NIPQUAD(myaddr.sin_addr),
1260 port, err ? "failed" : "ok", err);
1260 return err; 1261 return err;
1261} 1262}
1262 1263
@@ -1315,7 +1316,7 @@ static void xs_udp_connect_worker(struct work_struct *work)
1315 } 1316 }
1316 xs_reclassify_socket(sock); 1317 xs_reclassify_socket(sock);
1317 1318
1318 if (xs_bind(transport, sock)) { 1319 if (xs_bind4(transport, sock)) {
1319 sock_release(sock); 1320 sock_release(sock);
1320 goto out; 1321 goto out;
1321 } 1322 }
@@ -1402,7 +1403,7 @@ static void xs_tcp_connect_worker(struct work_struct *work)
1402 } 1403 }
1403 xs_reclassify_socket(sock); 1404 xs_reclassify_socket(sock);
1404 1405
1405 if (xs_bind(transport, sock)) { 1406 if (xs_bind4(transport, sock)) {
1406 sock_release(sock); 1407 sock_release(sock);
1407 goto out; 1408 goto out;
1408 } 1409 }