Commit 5957b1ac authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Paul E. McKenney

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: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent f5c8593c
...@@ -96,11 +96,6 @@ static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *c ...@@ -96,11 +96,6 @@ static int tcf_act_police_walker(struct sk_buff *skb, struct netlink_callback *c
goto done; goto done;
} }
static void tcf_police_free_rcu(struct rcu_head *head)
{
kfree(container_of(head, struct tcf_police, tcf_rcu));
}
static void tcf_police_destroy(struct tcf_police *p) static void tcf_police_destroy(struct tcf_police *p)
{ {
unsigned int h = tcf_hash(p->tcf_index, POL_TAB_MASK); 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,7 +116,7 @@ static void tcf_police_destroy(struct tcf_police *p)
* gen_estimator est_timer() might access p->tcf_lock * gen_estimator est_timer() might access p->tcf_lock
* or bstats, wait a RCU grace period before freeing p * or bstats, wait a RCU grace period before freeing p
*/ */
call_rcu(&p->tcf_rcu, tcf_police_free_rcu); kfree_rcu(p, tcf_rcu);
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment