Skip to content

Commit

Permalink
net,rcu: convert call_rcu(tcf_common_free_rcu) to kfree_rcu()
Browse files Browse the repository at this point in the history
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 <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>
  • Loading branch information
Lai Jiangshan authored and Paul E. McKenney committed May 8, 2011
1 parent 025cea9 commit f5c8593
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
#include <net/act_api.h>
#include <net/netlink.h>

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);
Expand All @@ -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;
}
}
Expand Down

0 comments on commit f5c8593

Please sign in to comment.