cgroup: factor out kill_css()
authorTejun Heo <tj@kernel.org>
Wed, 14 Aug 2013 00:22:51 +0000 (20:22 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 14 Aug 2013 00:22:51 +0000 (20:22 -0400)
commitedae0c3358947f8be5ca99f762d89e0c38e1f5d5
treeb8eefc09b48fe05e7ad069e1136e1f5b4a514d5e
parent09a503ea3a816b285b0b402b7f785eaec0c7a7e1
cgroup: factor out kill_css()

Factor out css ref killing from cgroup_destroy_locked() into
kill_css().  We're gonna add more to the path and the factored out
function will eventually be called from other places too.

While at it, replace open coded percpu_ref_get() with css_get() for
consistency.  This shouldn't cause any functional difference as the
function is not used for root cgroups.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
kernel/cgroup.c