- sch_tree_lock(q);
- cl = __cls_set_class(&n->res.class, q->ops->cl_ops->bind_tcf(q, base, n->res.classid));
- sch_tree_unlock(q);
- if (cl)
- q->ops->cl_ops->unbind_tcf(q, cl);
- }
-#ifdef CONFIG_NET_CLS_ACT
- /*backward compatibility */
- if (tb[TCA_U32_POLICE-1])
- {
- act = kmalloc(sizeof(*act),GFP_KERNEL);
- if (NULL == act)
- return -ENOMEM;
-
- memset(act,0,sizeof(*act));
- ret = tcf_action_init_1(tb[TCA_U32_POLICE-1], est,act,"police", TCA_ACT_NOREPLACE, TCA_ACT_BIND);
- if (0 > ret){
- tcf_action_destroy(act, TCA_ACT_UNBIND);
- return ret;
- }
- act->type = TCA_OLD_COMPAT;
-
- sch_tree_lock(q);
- act = xchg(&n->action, act);
- sch_tree_unlock(q);
-
- tcf_action_destroy(act, TCA_ACT_UNBIND);
-