]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: conntrack: remove unneeded nf_ct_put
authorFlorian Westphal <fw@strlen.de>
Tue, 25 Aug 2020 22:52:45 +0000 (00:52 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 28 Aug 2020 17:51:27 +0000 (19:51 +0200)
commitf8231fce90a31e9ff2cc6ad2cfda9f2d22d02d89
tree8f68c885e6451f2343317f853cdb13da83d5ee82
parent3cf700d3666975e1e5af0561741ad37d40426698
netfilter: conntrack: remove unneeded nf_ct_put

We can delay refcount increment until we reassign the existing entry to
the current skb.

A 0 refcount can't happen while the nf_conn object is still in the
hash table and parallel mutations are impossible because we hold the
bucket lock.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_core.c