* [PATCH]net-sched: Fix actions referencing
@ 2008-08-07 9:42 jamal
2008-08-08 3:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: jamal @ 2008-08-07 9:42 UTC (permalink / raw)
To: David Miller; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 65 bytes --]
Noticed while exercising Denys' iproute changes.
cheers,
jamal
[-- Attachment #2: act_r --]
[-- Type: text/plain, Size: 1067 bytes --]
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.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
---
commit 82ca26fa474171326de9851a2f547c490f8e7276
tree 04ebfd9dcb15d463a0e49740940f0c8e86916a25
parent bb7564f1e081c18dae905c8fc871269f4a81ba99
author Jamal Hadi Salim <hadi@cyberus.ca> Thu, 07 Aug 2008 05:37:51 -0400
committer Jamal Hadi Salim <hadi@cyberus.ca> Thu, 07 Aug 2008 05:37:51 -0400
net/sched/act_api.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index d308c19..26c7e1f 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH]net-sched: Fix actions referencing
2008-08-07 9:42 [PATCH]net-sched: Fix actions referencing jamal
@ 2008-08-08 3:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-08-08 3:37 UTC (permalink / raw)
To: hadi; +Cc: netdev
From: jamal <hadi@cyberus.ca>
Date: Thu, 07 Aug 2008 05:42:57 -0400
> Noticed while exercising Denys' iproute changes.
Applied, thanks Jamal.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-08 3:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-07 9:42 [PATCH]net-sched: Fix actions referencing jamal
2008-08-08 3:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).