]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack: use mod_timer_pending() for conntrack refresh
authorPatrick McHardy <kaber@trash.net>
Sat, 13 Jun 2009 10:21:49 +0000 (12:21 +0200)
committerPatrick McHardy <kaber@trash.net>
Sat, 13 Jun 2009 10:21:49 +0000 (12:21 +0200)
commit73b2dec9dc15ab127e4f70645aff78a9fe697067
tree3ba0ae9cbd474723f47e5ea8f1d21e212381c135
parent19ce36d630f080d2fb352307ff93c1db5dea4739
netfilter: nf_conntrack: use mod_timer_pending() for conntrack refresh

Use mod_timer_pending() instead of atomic sequence of del_timer()/
add_timer(). mod_timer_pending() does not rearm an inactive timer,
so we don't need the conntrack lock anymore to make sure we don't
accidentally rearm a timer of a conntrack which is in the process
of being destroyed.

With this change, we don't need to take the global lock anymore at all,
counter updates can be performed under the per-conntrack lock.

Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/nf_conntrack_core.c