diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2007-08-06 11:57:28 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:16:08 -0400 |
commit | 7dc753f0391ad94868609376f37be4833671b57d (patch) | |
tree | 7b34dcdb70b2377b5f8e2d6160be9adda2df0ac3 | |
parent | 20612005c51a5ba1bb17902276b9216825958724 (diff) |
SUNRPC: Rename xs_bind() to prepare for IPv6-specific bind method
Prepare for introduction of IPv6-specific socket bind function.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | net/sunrpc/xprtsock.c | 11 |
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 | ||
1230 | static int xs_bind(struct sock_xprt *transport, struct socket *sock) | 1230 | static 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 | } |