diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-03 17:27:58 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 17:27:58 -0400 |
commit | eee4fe4ded6e9c196168aee8f9787771f4df9c90 (patch) | |
tree | 271a5837eef0a7f25bf7c8e1e36f413271dd70c7 /net/dccp | |
parent | 8258175c811440e93baa15ab1962a5905686dda3 (diff) |
[INET]: Let inet_ctl_sock_create return sock rather than socket.
All upper protocol layers are already use sock internally.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 4 | ||||
-rw-r--r-- | net/dccp/ipv6.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index feb3fa5b7141..5669c895c873 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -991,7 +991,6 @@ static struct inet_protosw dccp_v4_protosw = { | |||
991 | 991 | ||
992 | static int __init dccp_v4_init(void) | 992 | static int __init dccp_v4_init(void) |
993 | { | 993 | { |
994 | struct socket *socket; | ||
995 | int err = proto_register(&dccp_v4_prot, 1); | 994 | int err = proto_register(&dccp_v4_prot, 1); |
996 | 995 | ||
997 | if (err != 0) | 996 | if (err != 0) |
@@ -1003,11 +1002,10 @@ static int __init dccp_v4_init(void) | |||
1003 | 1002 | ||
1004 | inet_register_protosw(&dccp_v4_protosw); | 1003 | inet_register_protosw(&dccp_v4_protosw); |
1005 | 1004 | ||
1006 | err = inet_ctl_sock_create(&socket, PF_INET, | 1005 | err = inet_ctl_sock_create(&dccp_v4_ctl_sk, PF_INET, |
1007 | SOCK_DCCP, IPPROTO_DCCP); | 1006 | SOCK_DCCP, IPPROTO_DCCP); |
1008 | if (err) | 1007 | if (err) |
1009 | goto out_unregister_protosw; | 1008 | goto out_unregister_protosw; |
1010 | dccp_v4_ctl_sk = socket->sk; | ||
1011 | out: | 1009 | out: |
1012 | return err; | 1010 | return err; |
1013 | out_unregister_protosw: | 1011 | out_unregister_protosw: |
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 5690fbd3bf68..cf598bfc6a18 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c | |||
@@ -1173,7 +1173,6 @@ static struct inet_protosw dccp_v6_protosw = { | |||
1173 | 1173 | ||
1174 | static int __init dccp_v6_init(void) | 1174 | static int __init dccp_v6_init(void) |
1175 | { | 1175 | { |
1176 | struct socket *socket; | ||
1177 | int err = proto_register(&dccp_v6_prot, 1); | 1176 | int err = proto_register(&dccp_v6_prot, 1); |
1178 | 1177 | ||
1179 | if (err != 0) | 1178 | if (err != 0) |
@@ -1185,11 +1184,10 @@ static int __init dccp_v6_init(void) | |||
1185 | 1184 | ||
1186 | inet6_register_protosw(&dccp_v6_protosw); | 1185 | inet6_register_protosw(&dccp_v6_protosw); |
1187 | 1186 | ||
1188 | err = inet_ctl_sock_create(&socket, PF_INET6, | 1187 | err = inet_ctl_sock_create(&dccp_v6_ctl_sk, PF_INET6, |
1189 | SOCK_DCCP, IPPROTO_DCCP); | 1188 | SOCK_DCCP, IPPROTO_DCCP); |
1190 | if (err != 0) | 1189 | if (err != 0) |
1191 | goto out_unregister_protosw; | 1190 | goto out_unregister_protosw; |
1192 | dccp_v6_ctl_sk = socket->sk; | ||
1193 | out: | 1191 | out: |
1194 | return err; | 1192 | return err; |
1195 | out_unregister_protosw: | 1193 | out_unregister_protosw: |