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

net,rcu: convert call_rcu(__gen_kill_estimator) to kfree_rcu()

The rcu callback __gen_kill_estimator() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(__gen_kill_estimator).
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>
上级 bceb0f45
...@@ -249,13 +249,6 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats, ...@@ -249,13 +249,6 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
} }
EXPORT_SYMBOL(gen_new_estimator); EXPORT_SYMBOL(gen_new_estimator);
static void __gen_kill_estimator(struct rcu_head *head)
{
struct gen_estimator *e = container_of(head,
struct gen_estimator, e_rcu);
kfree(e);
}
/** /**
* gen_kill_estimator - remove a rate estimator * gen_kill_estimator - remove a rate estimator
* @bstats: basic statistics * @bstats: basic statistics
...@@ -279,7 +272,7 @@ void gen_kill_estimator(struct gnet_stats_basic_packed *bstats, ...@@ -279,7 +272,7 @@ void gen_kill_estimator(struct gnet_stats_basic_packed *bstats,
write_unlock(&est_lock); write_unlock(&est_lock);
list_del_rcu(&e->list); list_del_rcu(&e->list);
call_rcu(&e->e_rcu, __gen_kill_estimator); kfree_rcu(e, e_rcu);
} }
spin_unlock_bh(&est_tree_lock); spin_unlock_bh(&est_tree_lock);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册