sunrpc: Merge the xs_bind code
authorPavel Emelyanov <xemul@parallels.com>
Tue, 5 Oct 2010 11:53:08 +0000 (15:53 +0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 19 Oct 2010 14:48:15 +0000 (10:48 -0400)
commitbeb59b68280d9779cc16591115547678d1c74a66
tree12e6bd18bba78f67793d6a99522705f2e9e72d77
parent573018c07e040b2c3f3cb8251f66fa4a5cb7425d
sunrpc: Merge the xs_bind code

There's the only difference betseen the xs_bind4 and the
xs_bind6 - the size of sockaddr structure they use.

Fortunatelly its size can be indirectly get from the transport.

Change since v1:
* use sockaddr_storage instead of sockaddr
* use rpc_set_port instead of manual port assigning

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
[bfields@redhat.com: fix address family initialization]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtsock.c