Skip to content

Commit dad178f

Browse files
Lai Jiangshanpaulmck
authored andcommitted
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: 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>
1 parent bceb0f4 commit dad178f

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎net/core/gen_estimator.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,13 +249,6 @@ int gen_new_estimator(struct gnet_stats_basic_packed *bstats,
249249
}
250250
EXPORT_SYMBOL(gen_new_estimator);
251251

252-
static void __gen_kill_estimator(struct rcu_head *head)
253-
{
254-
struct gen_estimator *e = container_of(head,
255-
struct gen_estimator, e_rcu);
256-
kfree(e);
257-
}
258-
259252
/**
260253
* gen_kill_estimator - remove a rate estimator
261254
* @bstats: basic statistics
@@ -279,7 +272,7 @@ void gen_kill_estimator(struct gnet_stats_basic_packed *bstats,
279272
write_unlock(&est_lock);
280273

281274
list_del_rcu(&e->list);
282-
call_rcu(&e->e_rcu, __gen_kill_estimator);
275+
kfree_rcu(e, e_rcu);
283276
}
284277
spin_unlock_bh(&est_tree_lock);
285278
}

0 commit comments

Comments
 (0)