diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2010-09-29 08:04:18 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2010-10-01 17:18:55 -0400 |
commit | 62832c039eab9d03cd28a66427ce8276988f28b0 (patch) | |
tree | 47d0b7fbd5ca567aa31661146ba16218149d67c8 /net/sunrpc/svcsock.c | |
parent | fc5d00b04a3a58cac8620403dfe9f43f72578ec1 (diff) |
sunrpc: Pull net argument downto svc_create_socket
After this the socket creation in it knows the context.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 7e534dd09077..559338527f47 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -64,7 +64,8 @@ static void svc_tcp_sock_detach(struct svc_xprt *); | |||
64 | static void svc_sock_free(struct svc_xprt *); | 64 | static void svc_sock_free(struct svc_xprt *); |
65 | 65 | ||
66 | static struct svc_xprt *svc_create_socket(struct svc_serv *, int, | 66 | static struct svc_xprt *svc_create_socket(struct svc_serv *, int, |
67 | struct sockaddr *, int, int); | 67 | struct net *, struct sockaddr *, |
68 | int, int); | ||
68 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 69 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
69 | static struct lock_class_key svc_key[2]; | 70 | static struct lock_class_key svc_key[2]; |
70 | static struct lock_class_key svc_slock_key[2]; | 71 | static struct lock_class_key svc_slock_key[2]; |
@@ -657,10 +658,11 @@ static struct svc_xprt *svc_udp_accept(struct svc_xprt *xprt) | |||
657 | } | 658 | } |
658 | 659 | ||
659 | static struct svc_xprt *svc_udp_create(struct svc_serv *serv, | 660 | static struct svc_xprt *svc_udp_create(struct svc_serv *serv, |
661 | struct net *net, | ||
660 | struct sockaddr *sa, int salen, | 662 | struct sockaddr *sa, int salen, |
661 | int flags) | 663 | int flags) |
662 | { | 664 | { |
663 | return svc_create_socket(serv, IPPROTO_UDP, sa, salen, flags); | 665 | return svc_create_socket(serv, IPPROTO_UDP, net, sa, salen, flags); |
664 | } | 666 | } |
665 | 667 | ||
666 | static struct svc_xprt_ops svc_udp_ops = { | 668 | static struct svc_xprt_ops svc_udp_ops = { |
@@ -1178,10 +1180,11 @@ static int svc_tcp_has_wspace(struct svc_xprt *xprt) | |||
1178 | } | 1180 | } |
1179 | 1181 | ||
1180 | static struct svc_xprt *svc_tcp_create(struct svc_serv *serv, | 1182 | static struct svc_xprt *svc_tcp_create(struct svc_serv *serv, |
1183 | struct net *net, | ||
1181 | struct sockaddr *sa, int salen, | 1184 | struct sockaddr *sa, int salen, |
1182 | int flags) | 1185 | int flags) |
1183 | { | 1186 | { |
1184 | return svc_create_socket(serv, IPPROTO_TCP, sa, salen, flags); | 1187 | return svc_create_socket(serv, IPPROTO_TCP, net, sa, salen, flags); |
1185 | } | 1188 | } |
1186 | 1189 | ||
1187 | static struct svc_xprt_ops svc_tcp_ops = { | 1190 | static struct svc_xprt_ops svc_tcp_ops = { |
@@ -1385,6 +1388,7 @@ EXPORT_SYMBOL_GPL(svc_addsock); | |||
1385 | */ | 1388 | */ |
1386 | static struct svc_xprt *svc_create_socket(struct svc_serv *serv, | 1389 | static struct svc_xprt *svc_create_socket(struct svc_serv *serv, |
1387 | int protocol, | 1390 | int protocol, |
1391 | struct net *net, | ||
1388 | struct sockaddr *sin, int len, | 1392 | struct sockaddr *sin, int len, |
1389 | int flags) | 1393 | int flags) |
1390 | { | 1394 | { |