diff options
author | Martin Josefsson <gandalf@wlug.westbo.se> | 2006-10-30 18:13:58 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-30 18:24:46 -0500 |
commit | c073e3fa8b7f9841aa6451885f135656d455f511 (patch) | |
tree | 72e0b8d7693035f417cdf0bf3ed754d51cef9ee5 | |
parent | ef4512e76679b4f4997f60f93f8a576a0d20c26b (diff) |
[NETFILTER]: nf_conntrack: add missing unlock in get_next_corpse()
Add missing unlock in get_next_corpse() in nf_conntrack. It was missed
during the removal of listhelp.h . Also remove an unneeded use of
nf_ct_tuplehash_to_ctrack() in the same function.
Should be applied before 2.6.19 is released.
Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 093b3ddc513c..836541e509fe 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -1520,9 +1520,10 @@ get_next_corpse(int (*iter)(struct nf_conn *i, void *data), | |||
1520 | if (iter(ct, data)) | 1520 | if (iter(ct, data)) |
1521 | goto found; | 1521 | goto found; |
1522 | } | 1522 | } |
1523 | write_unlock_bh(&nf_conntrack_lock); | ||
1523 | return NULL; | 1524 | return NULL; |
1524 | found: | 1525 | found: |
1525 | atomic_inc(&nf_ct_tuplehash_to_ctrack(h)->ct_general.use); | 1526 | atomic_inc(&ct->ct_general.use); |
1526 | write_unlock_bh(&nf_conntrack_lock); | 1527 | write_unlock_bh(&nf_conntrack_lock); |
1527 | return ct; | 1528 | return ct; |
1528 | } | 1529 | } |