diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-15 05:56:10 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-08 01:50:47 -0400 |
commit | 025cea99db3fb110ebc8ede5ff647833fab9574f (patch) | |
tree | cfef202674eaf06953405b03b000e77251287099 /kernel/cgroup.c | |
parent | f2da1c40dc003939f616f27a103b2592f1424b07 (diff) |
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>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 20451ce7195f..909a35510af5 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -4610,14 +4610,6 @@ bool css_is_ancestor(struct cgroup_subsys_state *child, | |||
4610 | return ret; | 4610 | return ret; |
4611 | } | 4611 | } |
4612 | 4612 | ||
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 | |||
4621 | void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) | 4613 | void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) |
4622 | { | 4614 | { |
4623 | struct css_id *id = css->id; | 4615 | struct css_id *id = css->id; |
@@ -4632,7 +4624,7 @@ void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) | |||
4632 | spin_lock(&ss->id_lock); | 4624 | spin_lock(&ss->id_lock); |
4633 | idr_remove(&ss->idr, id->id); | 4625 | idr_remove(&ss->idr, id->id); |
4634 | spin_unlock(&ss->id_lock); | 4626 | spin_unlock(&ss->id_lock); |
4635 | call_rcu(&id->rcu_head, __free_css_id_cb); | 4627 | kfree_rcu(id, rcu_head); |
4636 | } | 4628 | } |
4637 | EXPORT_SYMBOL_GPL(free_css_id); | 4629 | EXPORT_SYMBOL_GPL(free_css_id); |
4638 | 4630 | ||