diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 14:29:43 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:56 -0400 |
commit | a48b5a61448899040dfbd2e0cd55b06a2bd2466c (patch) | |
tree | b7efde642bde0eec3cb7171fdda38de349e409ff /net/sched/sch_hfsc.c | |
parent | 3bebcda28077375470dd60545b71bba2f83335fd (diff) |
[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>
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 7d51d0d6a70e..9d124c4ee3a7 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1122,22 +1122,11 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid, | |||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | static void | 1124 | static void |
1125 | hfsc_destroy_filters(struct tcf_proto **fl) | ||
1126 | { | ||
1127 | struct tcf_proto *tp; | ||
1128 | |||
1129 | while ((tp = *fl) != NULL) { | ||
1130 | *fl = tp->next; | ||
1131 | tcf_destroy(tp); | ||
1132 | } | ||
1133 | } | ||
1134 | |||
1135 | static void | ||
1136 | hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) | 1125 | hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) |
1137 | { | 1126 | { |
1138 | struct hfsc_sched *q = qdisc_priv(sch); | 1127 | struct hfsc_sched *q = qdisc_priv(sch); |
1139 | 1128 | ||
1140 | hfsc_destroy_filters(&cl->filter_list); | 1129 | tcf_destroy_chain(cl->filter_list); |
1141 | qdisc_destroy(cl->qdisc); | 1130 | qdisc_destroy(cl->qdisc); |
1142 | #ifdef CONFIG_NET_ESTIMATOR | 1131 | #ifdef CONFIG_NET_ESTIMATOR |
1143 | gen_kill_estimator(&cl->bstats, &cl->rate_est); | 1132 | gen_kill_estimator(&cl->bstats, &cl->rate_est); |