From b2410558284b547285d21b2a7923b2a293b64bdd Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Sat, 7 Jul 2007 22:32:03 -0700 Subject: [PATCH] --- yaml --- r: 58995 b: refs/heads/master c: 4e1d4e6c5a448bd114e0cef6311c974cb7c7385e h: refs/heads/master i: 58993: e4b06d97ac62b2248c3645b8d1777a316a6fe583 58991: 73a07dbf72946c5c1c1d4329838a4d17d79b5144 v: v3 --- [refs] | 2 +- trunk/net/netfilter/nf_conntrack_expect.c | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 988bc88e54c9..0ddbd0d6cd18 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d4156e8cd93f5772483928aaf4960120caebd789 +refs/heads/master: 4e1d4e6c5a448bd114e0cef6311c974cb7c7385e diff --git a/trunk/net/netfilter/nf_conntrack_expect.c b/trunk/net/netfilter/nf_conntrack_expect.c index 83b5ad85e0ee..5c8cb0f243a2 100644 --- a/trunk/net/netfilter/nf_conntrack_expect.c +++ b/trunk/net/netfilter/nf_conntrack_expect.c @@ -165,17 +165,10 @@ static inline int expect_matches(const struct nf_conntrack_expect *a, /* Generally a bad idea to call this: could have matched already. */ void nf_ct_unexpect_related(struct nf_conntrack_expect *exp) { - struct nf_conntrack_expect *i; - write_lock_bh(&nf_conntrack_lock); - /* choose the oldest expectation to evict */ - list_for_each_entry_reverse(i, &nf_ct_expect_list, list) { - if (expect_matches(i, exp) && del_timer(&i->timeout)) { - nf_ct_unlink_expect(i); - write_unlock_bh(&nf_conntrack_lock); - nf_ct_expect_put(i); - return; - } + if (del_timer(&exp->timeout)) { + nf_ct_unlink_expect(exp); + nf_ct_expect_put(exp); } write_unlock_bh(&nf_conntrack_lock); }