提交 7dc753f0 编写于 作者: C Chuck Lever 提交者: Trond Myklebust

SUNRPC: Rename xs_bind() to prepare for IPv6-specific bind method

Prepare for introduction of IPv6-specific socket bind function.
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 20612005
...@@ -1227,7 +1227,7 @@ static void xs_set_port(struct rpc_xprt *xprt, unsigned short port) ...@@ -1227,7 +1227,7 @@ static void xs_set_port(struct rpc_xprt *xprt, unsigned short port)
} }
} }
static int xs_bind(struct sock_xprt *transport, struct socket *sock) static int xs_bind4(struct sock_xprt *transport, struct socket *sock)
{ {
struct sockaddr_in myaddr = { struct sockaddr_in myaddr = {
.sin_family = AF_INET, .sin_family = AF_INET,
...@@ -1255,8 +1255,9 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock) ...@@ -1255,8 +1255,9 @@ static int xs_bind(struct sock_xprt *transport, struct socket *sock)
else else
port--; port--;
} while (err == -EADDRINUSE && port != transport->port); } while (err == -EADDRINUSE && port != transport->port);
dprintk("RPC: xs_bind "NIPQUAD_FMT":%u: %s (%d)\n", dprintk("RPC: %s "NIPQUAD_FMT":%u: %s (%d)\n",
NIPQUAD(myaddr.sin_addr), port, err ? "failed" : "ok", err); __FUNCTION__, NIPQUAD(myaddr.sin_addr),
port, err ? "failed" : "ok", err);
return err; return err;
} }
...@@ -1315,7 +1316,7 @@ static void xs_udp_connect_worker(struct work_struct *work) ...@@ -1315,7 +1316,7 @@ static void xs_udp_connect_worker(struct work_struct *work)
} }
xs_reclassify_socket(sock); xs_reclassify_socket(sock);
if (xs_bind(transport, sock)) { if (xs_bind4(transport, sock)) {
sock_release(sock); sock_release(sock);
goto out; goto out;
} }
...@@ -1402,7 +1403,7 @@ static void xs_tcp_connect_worker(struct work_struct *work) ...@@ -1402,7 +1403,7 @@ static void xs_tcp_connect_worker(struct work_struct *work)
} }
xs_reclassify_socket(sock); xs_reclassify_socket(sock);
if (xs_bind(transport, sock)) { if (xs_bind4(transport, sock)) {
sock_release(sock); sock_release(sock);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册