be2net: support asymmetric rx/tx queue counts
[deliverable/linux.git] / net / sched / cls_basic.c
index fc399db86f11b17cb05536df8f211fe79c7a3232..0b8c3ace671f1fff47cf2a12f7e6428bb5704b9f 100644 (file)
@@ -96,11 +96,14 @@ static void basic_delete_filter(struct rcu_head *head)
        kfree(f);
 }
 
-static void basic_destroy(struct tcf_proto *tp)
+static bool basic_destroy(struct tcf_proto *tp, bool force)
 {
        struct basic_head *head = rtnl_dereference(tp->root);
        struct basic_filter *f, *n;
 
+       if (!force && !list_empty(&head->flist))
+               return false;
+
        list_for_each_entry_safe(f, n, &head->flist, link) {
                list_del_rcu(&f->link);
                tcf_unbind_filter(tp, &f->res);
@@ -108,6 +111,7 @@ static void basic_destroy(struct tcf_proto *tp)
        }
        RCU_INIT_POINTER(tp->root, NULL);
        kfree_rcu(head, rcu);
+       return true;
 }
 
 static int basic_delete(struct tcf_proto *tp, unsigned long arg)
This page took 0.049881 seconds and 5 git commands to generate.