]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: conntrack: simplify the code by using nf_conntrack_get_ht
authorLiping Zhang <liping.zhang@spreadtrum.com>
Sat, 13 Aug 2016 14:35:36 +0000 (22:35 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 17 Aug 2016 23:20:52 +0000 (01:20 +0200)
commitcaafbd1a808f40a831d862174b77ab11250b6741
tree3175f4f3d8edd94dfbe7a828615073b260531a92
parent9f1d839ca56ec8daa57802c043430fe1dd5e8047
netfilter: conntrack: simplify the code by using nf_conntrack_get_ht

Since commit 71b663841bb9 ("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>
include/net/netfilter/nf_conntrack.h
include/net/netfilter/nf_conntrack_core.h
net/netfilter/nf_conntrack_core.c