summaryrefslogtreecommitdiff
path: root/include/net/netfilter/nf_conntrack_core.h
diff options
context:
space:
mode:
authorLiping Zhang <liping.zhang@spreadtrum.com>2016-08-13 17:35:36 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-18 02:20:52 +0300
commit92e47ba8839bacc185db89f3b11cd8036193e6a9 (patch)
tree3175f4f3d8edd94dfbe7a828615073b260531a92 /include/net/netfilter/nf_conntrack_core.h
parentadf0516845bcd0e626323c858ece28ee58c74455 (diff)
downloadlinux-92e47ba8839bacc185db89f3b11cd8036193e6a9.tar.xz
netfilter: conntrack: simplify the code by using nf_conntrack_get_ht
Since commit 64b87639c9cb ("netfilter: conntrack: fix race between nf_conntrack proc read and hash resize") introduce the nf_conntrack_get_ht, so there's no need to check nf_conntrack_generation again and again to get the hash table and hash size. And convert nf_conntrack_get_ht to inline function here. Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_conntrack_core.h')
-rw-r--r--include/net/netfilter/nf_conntrack_core.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/net/netfilter/nf_conntrack_core.h b/include/net/netfilter/nf_conntrack_core.h
index 79d7ac5c9740..62e17d1319ff 100644
--- a/include/net/netfilter/nf_conntrack_core.h
+++ b/include/net/netfilter/nf_conntrack_core.h
@@ -51,8 +51,6 @@ bool nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse,
const struct nf_conntrack_l3proto *l3proto,
const struct nf_conntrack_l4proto *l4proto);
-void nf_conntrack_get_ht(struct hlist_nulls_head **hash, unsigned int *hsize);
-
/* Find a connection corresponding to a tuple. */
struct nf_conntrack_tuple_hash *
nf_conntrack_find_get(struct net *net,
@@ -83,7 +81,6 @@ print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple,
#define CONNTRACK_LOCKS 1024
-extern struct hlist_nulls_head *nf_conntrack_hash;
extern spinlock_t nf_conntrack_locks[CONNTRACK_LOCKS];
void nf_conntrack_lock(spinlock_t *lock);