From: Lai Jiangshan Date: Tue, 15 Mar 2011 09:57:04 +0000 (+0800) Subject: net,rcu: convert call_rcu(tcf_common_free_rcu) to kfree_rcu() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5c8593c107500979909bd51c85e74bb2eaffbaa;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git net,rcu: convert call_rcu(tcf_common_free_rcu) to kfree_rcu() The rcu callback tcf_common_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(tcf_common_free_rcu). Signed-off-by: Lai Jiangshan Acked-by: David S. Miller Signed-off-by: Paul E. McKenney Reviewed-by: Josh Triplett --- diff --git a/net/sched/act_api.c b/net/sched/act_api.c index 14b42f4ad791..a606025814a1 100644 --- a/net/sched/act_api.c +++ b/net/sched/act_api.c @@ -26,11 +26,6 @@ #include #include -static void tcf_common_free_rcu(struct rcu_head *head) -{ - kfree(container_of(head, struct tcf_common, tcfc_rcu)); -} - void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo) { unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask); @@ -47,7 +42,7 @@ void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo) * gen_estimator est_timer() might access p->tcfc_lock * or bstats, wait a RCU grace period before freeing p */ - call_rcu(&p->tcfc_rcu, tcf_common_free_rcu); + kfree_rcu(p, tcfc_rcu); return; } }