提交 075ae866 编写于 作者: A Arnaldo Carvalho de Melo 提交者: David S. Miller

[DCCP]: Move dccp_hashinfo from ipv4.c to the core

As it is used by both ipv4 and ipv6.
Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0a1ec676
...@@ -30,14 +30,6 @@ ...@@ -30,14 +30,6 @@
#include "dccp.h" #include "dccp.h"
#include "feat.h" #include "feat.h"
struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
.lhash_lock = RW_LOCK_UNLOCKED,
.lhash_users = ATOMIC_INIT(0),
.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
};
EXPORT_SYMBOL_GPL(dccp_hashinfo);
static int dccp_v4_get_port(struct sock *sk, const unsigned short snum) static int dccp_v4_get_port(struct sock *sk, const unsigned short snum)
{ {
return inet_csk_get_port(&dccp_hashinfo, sk, snum, return inet_csk_get_port(&dccp_hashinfo, sk, snum,
......
...@@ -47,6 +47,14 @@ atomic_t dccp_orphan_count = ATOMIC_INIT(0); ...@@ -47,6 +47,14 @@ atomic_t dccp_orphan_count = ATOMIC_INIT(0);
EXPORT_SYMBOL_GPL(dccp_orphan_count); EXPORT_SYMBOL_GPL(dccp_orphan_count);
struct inet_hashinfo __cacheline_aligned dccp_hashinfo = {
.lhash_lock = RW_LOCK_UNLOCKED,
.lhash_users = ATOMIC_INIT(0),
.lhash_wait = __WAIT_QUEUE_HEAD_INITIALIZER(dccp_hashinfo.lhash_wait),
};
EXPORT_SYMBOL_GPL(dccp_hashinfo);
static struct net_protocol dccp_protocol = { static struct net_protocol dccp_protocol = {
.handler = dccp_v4_rcv, .handler = dccp_v4_rcv,
.err_handler = dccp_v4_err, .err_handler = dccp_v4_err,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册