From: Jamal Hadi Salim Date: Thu, 28 Aug 2008 05:38:11 +0000 (-0700) Subject: pkt_sched: Fix actions referencing X-Git-Tag: v2.6.26.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cd12f888ddb3a535ca34104593a0a62724ab104;p=thirdparty%2Fkernel%2Fstable.git pkt_sched: Fix actions referencing [ Upstream commit 76aab2c1eae491a5d73ac83deec97dd28ebac584 ] When an action is added several times with the same exact index it gets deleted on every even-numbered attempt. This fixes that issue. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 74e662cbb2c5b..b5e116c28e727 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -205,10 +205,9 @@ struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, int bind, { struct tcf_common *p = NULL; if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) { - if (bind) { + if (bind) p->tcfc_bindcnt++; - p->tcfc_refcnt++; - } + p->tcfc_refcnt++; a->priv = p; } return p;