[NET_SCHED]: Unline tcf_destroy
Uninline tcf_destroy and add a helper function to destroy an entire filter chain. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3bebcda280
commit
a48b5a6144
@@ -1121,23 +1121,12 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
hfsc_destroy_filters(struct tcf_proto **fl)
|
||||
{
|
||||
struct tcf_proto *tp;
|
||||
|
||||
while ((tp = *fl) != NULL) {
|
||||
*fl = tp->next;
|
||||
tcf_destroy(tp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl)
|
||||
{
|
||||
struct hfsc_sched *q = qdisc_priv(sch);
|
||||
|
||||
hfsc_destroy_filters(&cl->filter_list);
|
||||
tcf_destroy_chain(cl->filter_list);
|
||||
qdisc_destroy(cl->qdisc);
|
||||
#ifdef CONFIG_NET_ESTIMATOR
|
||||
gen_kill_estimator(&cl->bstats, &cl->rate_est);
|
||||
|
Reference in New Issue
Block a user