diff options
author | Jiri Pirko <jiri@mellanox.com> | 2017-02-09 14:38:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-10 11:38:08 -0500 |
commit | cf1facda2f61bc3e9ffd985b6d624dec6ad3f279 (patch) | |
tree | b6dda3c94a8e34fa9d895defe3ca6f46b6b898a6 /net/sched/sch_api.c | |
parent | 79112c26f14c38ddbac3b2739469e373ef424fe6 (diff) | |
download | linux-cf1facda2f61bc3e9ffd985b6d624dec6ad3f279.tar.gz linux-cf1facda2f61bc3e9ffd985b6d624dec6ad3f279.tar.bz2 linux-cf1facda2f61bc3e9ffd985b6d624dec6ad3f279.zip |
sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_api
Creation is done in this file, move destruction to be at the same place.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
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 | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index f30b517f2282..adeabaec0d0b 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1900,28 +1900,6 @@ reset: } EXPORT_SYMBOL(tc_classify); -bool tcf_proto_destroy(struct tcf_proto *tp, bool force) -{ - if (tp->ops->destroy(tp, force)) { - module_put(tp->ops->owner); - kfree_rcu(tp, rcu); - return true; - } - - return false; -} - -void tcf_destroy_chain(struct tcf_proto __rcu **fl) -{ - struct tcf_proto *tp; - - while ((tp = rtnl_dereference(*fl)) != NULL) { - RCU_INIT_POINTER(*fl, tp->next); - tcf_proto_destroy(tp, true); - } -} -EXPORT_SYMBOL(tcf_destroy_chain); - #ifdef CONFIG_PROC_FS static int psched_show(struct seq_file *seq, void *v) { |