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)
commitff73e7479b8eea594a985ca29f4b45d604dbcb2c
tree8f68c885e6451f2343317f853cdb13da83d5ee82
parentbc92470413f3af152db0d8f90ef3eb13f8cc417a
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