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_api.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_api.c')
-rw-r--r-- | net/sched/sch_api.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 58732509160d..5b5bce0694e2 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1220,6 +1220,24 @@ reclassify: | |||
1220 | return -1; | 1220 | return -1; |
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | void tcf_destroy(struct tcf_proto *tp) | ||
1224 | { | ||
1225 | tp->ops->destroy(tp); | ||
1226 | module_put(tp->ops->owner); | ||
1227 | kfree(tp); | ||
1228 | } | ||
1229 | |||
1230 | void tcf_destroy_chain(struct tcf_proto *fl) | ||
1231 | { | ||
1232 | struct tcf_proto *tp; | ||
1233 | |||
1234 | while ((tp = fl) != NULL) { | ||
1235 | fl = tp->next; | ||
1236 | tcf_destroy(tp); | ||
1237 | } | ||
1238 | } | ||
1239 | EXPORT_SYMBOL(tcf_destroy_chain); | ||
1240 | |||
1223 | #ifdef CONFIG_PROC_FS | 1241 | #ifdef CONFIG_PROC_FS |
1224 | static int psched_show(struct seq_file *seq, void *v) | 1242 | static int psched_show(struct seq_file *seq, void *v) |
1225 | { | 1243 | { |