Commit e4386456 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net_sched: cls_basic: remove unnecessary iteration and use passed arg

Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ae0bf040
...@@ -113,18 +113,12 @@ static void basic_destroy(struct tcf_proto *tp) ...@@ -113,18 +113,12 @@ static void basic_destroy(struct tcf_proto *tp)
static int basic_delete(struct tcf_proto *tp, unsigned long arg) static int basic_delete(struct tcf_proto *tp, unsigned long arg)
{ {
struct basic_head *head = rtnl_dereference(tp->root); struct basic_filter *f = (struct basic_filter *) arg;
struct basic_filter *t, *f = (struct basic_filter *) arg;
list_for_each_entry(t, &head->flist, link) list_del_rcu(&f->link);
if (t == f) { tcf_unbind_filter(tp, &f->res);
list_del_rcu(&t->link); call_rcu(&f->rcu, basic_delete_filter);
tcf_unbind_filter(tp, &t->res);
call_rcu(&t->rcu, basic_delete_filter);
return 0; return 0;
}
return -ENOENT;
} }
static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = { static const struct nla_policy basic_policy[TCA_BASIC_MAX + 1] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment