aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2011-03-15 05:58:00 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2011-05-08 01:50:48 -0400
commit5957b1ac52c5fde2afe5d80abe2a1cb82a9b4f20 (patch)
tree1b0a04a440d272fe925afd9cfe597bbc509c57bd /net/sched
parentf5c8593c107500979909bd51c85e74bb2eaffbaa (diff)
net,rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu()
[PATCH 05/17] net,rcu: convert call_rcu(tcf_police_free_rcu) to kfree_rcu() The rcu callback tcf_police_free_rcu() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(tcf_police_free_rcu). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/act_police.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 8a1630774fd6..d6bcd64e91de 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -96,11 +96,6 @@ nla_put_failure:
96 goto done; 96 goto done;
97} 97}
98 98
99static void tcf_police_free_rcu(struct rcu_head *head)
100{
101 kfree(container_of(head, struct tcf_police, tcf_rcu));
102}
103
104static void tcf_police_destroy(struct tcf_police *p) 99static void tcf_police_destroy(struct tcf_police *p)
105{ 100{
106 unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK); 101 unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK);
@@ -121,7 +116,7 @@ static void tcf_police_destroy(struct tcf_police *p)
121 * gen_estimator est_timer() might access p->tcf_lock 116 * gen_estimator est_timer() might access p->tcf_lock
122 * or bstats, wait a RCU grace period before freeing p 117 * or bstats, wait a RCU grace period before freeing p
123 */ 118 */
124 call_rcu(&p->tcf_rcu, tcf_police_free_rcu); 119 kfree_rcu(p, tcf_rcu);
125 return; 120 return;
126 } 121 }
127 } 122 }