]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup: use cgroup_apply_enable_control() in cgroup creation path
authorTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:00 +0000 (09:58 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:00 +0000 (09:58 -0500)
commit63f5f21e61d85cf421f265e8910b01a4c74d2a8f
tree7ded06e042e85e65557aa22180c9730181085cc1
parent7d130705e89bf48796c326f74ef79ef54184dc37
cgroup: use cgroup_apply_enable_control() in cgroup creation path

cgroup_create() manually updates control masks and creates child csses
which cgroup_mkdir() then manually populates.  Both can be simplified
by using cgroup_apply_enable_control() and friends.  The only catch is
that it calls css_populate_dir() with NULL cgroup->kn during
cgroup_create().  This is worked around by making the function noop on
NULL kn.

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