提交 f5c8593c 编写于 作者: L Lai Jiangshan 提交者: Paul E. McKenney

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: NLai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
上级 025cea99
......@@ -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);
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册