cgroup: reserve ID 0 for dummy_root and 1 for unified hierarchy
commitfc76df706123602214da494ba98bccea83e2cfff
authorTejun Heo <tj@kernel.org>
Tue, 25 Jun 2013 18:53:37 +0000 (25 11:53 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 25 Jun 2013 18:53:37 +0000 (25 11:53 -0700)
tree27ff818b65d9c2866ba1caee3c739ec9f9232337
parent30159ec7a9db7f3c91e2b27e66389c49302efd5c
cgroup: reserve ID 0 for dummy_root and 1 for unified hierarchy

Before 1a57423166 ("cgroup: make hierarchy_id use cyclic idr"),
hierarchy IDs were allocated from 0.  As the dummy hierarchy was
always the one first initialized, it got assigned 0 and all other
hierarchies from 1.  The patch accidentally changed the minimum
useable ID to 2.

Let's restore ID 0 for dummy_root and while at it reserve 1 for
unified hierarchy.

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