Skip to contentSkip to conversation

net-sched: Fix actions referencing

PATCH Applied jamal 2 participants 2 messages Aug 7, 2008 – Aug 8, 2008

Subsystems (3)
lore
Share & tools
lore

jamal

author
#0 lore raw

PATCH 1/1 net-sched: Fix actions referencing

Noticed while exercising Denys' iproute changes.

cheers,
jamal

net-sched: Fix actions referencing

When an action is added several times with the same exact index it gets deleted on every even-numbered attempt.
This fixes that issue.

---
commit 82ca26fa474171326de9851a2f547c490f8e7276
tree 04ebfd9dcb15d463a0e49740940f0c8e86916a25
parent bb7564f1e081c18dae905c8fc871269f4a81ba99
author Jamal Hadi Salim <[email protected]> Thu, 07 Aug 2008 05:37:51 -0400 committer Jamal Hadi Salim <[email protected]> Thu, 07 Aug 2008 05:37:51 -0400

 net/sched/act_api.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
net/sched/act_api.c +2 -3
index d308c19..26c7e1f 100644
@@ -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;
maintainer Applied
#1 lore raw

From: jamal <[email protected]>
Date: Thu, 07 Aug 2008 05:42:57 -0400

Quoted 1 line

Noticed while exercising Denys' iproute changes.

Applied, thanks Jamal.