diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-14 05:30:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-14 05:30:23 -0400 |
commit | df39e8ba56a788733d369068c7319e04b1da3cd5 (patch) | |
tree | 1e9be853bdb455e341cdbf957656f342cfa2eb9e /net/sched/cls_u32.c | |
parent | f5572855ec492334d8c3ec0e0e86c31865d5cf07 (diff) | |
parent | 159d83363b629c91d020734207c1bc788b96af5a (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ehea/ehea_main.c
drivers/net/wireless/iwlwifi/Kconfig
drivers/net/wireless/rt2x00/rt61pci.c
net/ipv4/inet_timewait_sock.c
net/ipv6/raw.c
net/mac80211/ieee80211_sta.c
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r-- | net/sched/cls_u32.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c index c5c16b4b6e98..4d755444c449 100644 --- a/net/sched/cls_u32.c +++ b/net/sched/cls_u32.c | |||
@@ -411,8 +411,10 @@ static void u32_destroy(struct tcf_proto *tp) | |||
411 | } | 411 | } |
412 | } | 412 | } |
413 | 413 | ||
414 | for (ht=tp_c->hlist; ht; ht = ht->next) | 414 | for (ht = tp_c->hlist; ht; ht = ht->next) { |
415 | ht->refcnt--; | ||
415 | u32_clear_hnode(tp, ht); | 416 | u32_clear_hnode(tp, ht); |
417 | } | ||
416 | 418 | ||
417 | while ((ht = tp_c->hlist) != NULL) { | 419 | while ((ht = tp_c->hlist) != NULL) { |
418 | tp_c->hlist = ht->next; | 420 | tp_c->hlist = ht->next; |
@@ -441,8 +443,12 @@ static int u32_delete(struct tcf_proto *tp, unsigned long arg) | |||
441 | if (tp->root == ht) | 443 | if (tp->root == ht) |
442 | return -EINVAL; | 444 | return -EINVAL; |
443 | 445 | ||
444 | if (--ht->refcnt == 0) | 446 | if (ht->refcnt == 1) { |
447 | ht->refcnt--; | ||
445 | u32_destroy_hnode(tp, ht); | 448 | u32_destroy_hnode(tp, ht); |
449 | } else { | ||
450 | return -EBUSY; | ||
451 | } | ||
446 | 452 | ||
447 | return 0; | 453 | return 0; |
448 | } | 454 | } |
@@ -568,7 +574,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle, | |||
568 | if (ht == NULL) | 574 | if (ht == NULL) |
569 | return -ENOBUFS; | 575 | return -ENOBUFS; |
570 | ht->tp_c = tp_c; | 576 | ht->tp_c = tp_c; |
571 | ht->refcnt = 0; | 577 | ht->refcnt = 1; |
572 | ht->divisor = divisor; | 578 | ht->divisor = divisor; |
573 | ht->handle = handle; | 579 | ht->handle = handle; |
574 | ht->prio = tp->prio; | 580 | ht->prio = tp->prio; |