diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 19:29:43 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 07:27:56 +0200 |
commit | a48b5a61448899040dfbd2e0cd55b06a2bd2466c (patch) | |
tree | b7efde642bde0eec3cb7171fdda38de349e409ff /net/sched/sch_api.c | |
parent | [NET_SCHED]: turn PSCHED_GET_TIME into inline function (diff) | |
download | linux-a48b5a61448899040dfbd2e0cd55b06a2bd2466c.tar.xz linux-a48b5a61448899040dfbd2e0cd55b06a2bd2466c.zip |
[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 '')
-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: return -1; } +void tcf_destroy(struct tcf_proto *tp) +{ + tp->ops->destroy(tp); + module_put(tp->ops->owner); + kfree(tp); +} + +void tcf_destroy_chain(struct tcf_proto *fl) +{ + struct tcf_proto *tp; + + while ((tp = fl) != NULL) { + fl = tp->next; + tcf_destroy(tp); + } +} +EXPORT_SYMBOL(tcf_destroy_chain); + #ifdef CONFIG_PROC_FS static int psched_show(struct seq_file *seq, void *v) { |