aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sched/cls_basic.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index cd61280941e5..1c122c7e0549 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -113,18 +113,12 @@ static void basic_destroy(struct tcf_proto *tp)
113 113
114static int basic_delete(struct tcf_proto *tp, unsigned long arg) 114static int basic_delete(struct tcf_proto *tp, unsigned long arg)
115{ 115{
116 struct basic_head *head = rtnl_dereference(tp->root); 116 struct basic_filter *f = (struct basic_filter *) arg;
117 struct basic_filter *t, *f = (struct basic_filter *) arg;
118
119 list_for_each_entry(t, &head->flist, link)
120 if (t == f) {
121 list_del_rcu(&t->link);
122 tcf_unbind_filter(tp, &t->res);
123 call_rcu(&t->rcu, basic_delete_filter);
124 return 0;
125 }
126 117
127 return -ENOENT; 118 list_del_rcu(&f->link);
119 tcf_unbind_filter(tp, &f->res);
120 call_rcu(&f->rcu, basic_delete_filter);
121 return 0;
128} 122}
129 123
130static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = { 124static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = {