cgroup: use cgroup_apply_enable_control() in cgroup creation path
commit03970d3c11faf870dc5126bb2e84fd1d692af1b7
authorTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:00 +0000 (3 09:58 -0500)
committerTejun Heo <tj@kernel.org>
Thu, 3 Mar 2016 14:58:00 +0000 (3 09:58 -0500)
tree7ded06e042e85e65557aa22180c9730181085cc1
parent945ba1996888809cf510a8da000a9c20a9fab5ad
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