Skip to content

Commit 025cea9

Browse files
Lai Jiangshanpaulmck
authored andcommitted
cgroup,rcu: convert call_rcu(__free_css_id_cb) to kfree_rcu()
The rcu callback __free_css_id_cb() just calls a kfree(), so we use kfree_rcu() instead of the call_rcu(__free_css_id_cb). Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Acked-by: Paul Menage <menage@google.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
1 parent f2da1c4 commit 025cea9

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

‎kernel/cgroup.c‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4610,14 +4610,6 @@ bool css_is_ancestor(struct cgroup_subsys_state *child,
46104610
return ret;
46114611
}
46124612

4613-
static void __free_css_id_cb(struct rcu_head *head)
4614-
{
4615-
struct css_id *id;
4616-
4617-
id = container_of(head, struct css_id, rcu_head);
4618-
kfree(id);
4619-
}
4620-
46214613
void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css)
46224614
{
46234615
struct css_id *id = css->id;
@@ -4632,7 +4624,7 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css)
46324624
spin_lock(&ss->id_lock);
46334625
idr_remove(&ss->idr, id->id);
46344626
spin_unlock(&ss->id_lock);
4635-
call_rcu(&id->rcu_head, __free_css_id_cb);
4627+
kfree_rcu(id, rcu_head);
46364628
}
46374629
EXPORT_SYMBOL_GPL(free_css_id);
46384630

0 commit comments

Comments
 (0)