cgroup: use cgroup_setup_root() to initialize cgroup_dummy_root
authorTejun Heo <tj@kernel.org>
Wed, 19 Mar 2014 14:23:53 +0000 (10:23 -0400)
committerTejun Heo <tj@kernel.org>
Wed, 19 Mar 2014 14:23:53 +0000 (10:23 -0400)
commit985ed670144c25058f235276f69d687de1b7c7ba
treef34e4c7c1dc4a339672749524d07eef21eefaf28
parent172a2c0685ff3bc0b7a611b308aac0694de34594
cgroup: use cgroup_setup_root() to initialize cgroup_dummy_root

cgroup_dummy_root is used to host controllers which aren't attached to
any other hierarchy.  The root is minimally set up during kernfs
bootstrap and didn't go through full hierarchy initialization.  We're
planning to use cgroup_dummy_root for the default unified hierarchy
and thus want it to be fully functional.

Replace the special initialization, which was collected into
cgroup_init() by the previous patch, with an invocation of
cgroup_setup_root().  This simplifies the init path and makes
cgroup_dummy_root a full hierarchy with its own kernfs_root and all.

As this puts the dummy hierarchy on the cgroup_roots list, rename
for_each_active_root() to for_each_root() and update its users to skip
the dummy root for now.

This patch doesn't cause any userland visible behavior changes at this
point.

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