Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Lai Jiangshan and committed by
Paul E. McKenney
025cea99 f2da1c40

+1 -9
+1 -9
kernel/cgroup.c
··· 4610 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 4613 void free_css_id(struct cgroup_subsys *ss, struct cgroup_subsys_state *css) 4622 4614 { 4623 4615 struct css_id *id = css->id; ··· 4624 4632 spin_lock(&ss->id_lock); 4625 4633 idr_remove(&ss->idr, id->id); 4626 4634 spin_unlock(&ss->id_lock); 4627 - call_rcu(&id->rcu_head, __free_css_id_cb); 4635 + kfree_rcu(id, rcu_head); 4628 4636 } 4629 4637 EXPORT_SYMBOL_GPL(free_css_id); 4630 4638