]> err.no Git - linux-2.6/blobdiff - net/sched/sch_api.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / net / sched / sch_api.c
index 15b91a9ee8e83af22fb8edcd475b8ba94ce3e8da..10f01ad043800589f9d2eebd994c7f8de86ce19b 100644 (file)
@@ -386,6 +386,9 @@ void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
        if (n == 0)
                return;
        while ((parentid = sch->parent)) {
+               if (TC_H_MAJ(parentid) == TC_H_MAJ(TC_H_INGRESS))
+                       return;
+
                sch = qdisc_lookup(sch->dev, TC_H_MAJ(parentid));
                if (sch == NULL) {
                        WARN_ON(parentid != TC_H_ROOT);
@@ -1249,12 +1252,12 @@ void tcf_destroy(struct tcf_proto *tp)
        kfree(tp);
 }
 
-void tcf_destroy_chain(struct tcf_proto *fl)
+void tcf_destroy_chain(struct tcf_proto **fl)
 {
        struct tcf_proto *tp;
 
-       while ((tp = fl) != NULL) {
-               fl = tp->next;
+       while ((tp = *fl) != NULL) {
+               *fl = tp->next;
                tcf_destroy(tp);
        }
 }