|
@@ -1160,18 +1160,12 @@ static void cgroup_exit_root_id(struct cgroup_root *root)
|
|
{
|
|
{
|
|
lockdep_assert_held(&cgroup_mutex);
|
|
lockdep_assert_held(&cgroup_mutex);
|
|
|
|
|
|
- if (root->hierarchy_id) {
|
|
|
|
- idr_remove(&cgroup_hierarchy_idr, root->hierarchy_id);
|
|
|
|
- root->hierarchy_id = 0;
|
|
|
|
- }
|
|
|
|
|
|
+ idr_remove(&cgroup_hierarchy_idr, root->hierarchy_id);
|
|
}
|
|
}
|
|
|
|
|
|
static void cgroup_free_root(struct cgroup_root *root)
|
|
static void cgroup_free_root(struct cgroup_root *root)
|
|
{
|
|
{
|
|
if (root) {
|
|
if (root) {
|
|
- /* hierarchy ID should already have been released */
|
|
|
|
- WARN_ON_ONCE(root->hierarchy_id);
|
|
|
|
-
|
|
|
|
idr_destroy(&root->cgroup_idr);
|
|
idr_destroy(&root->cgroup_idr);
|
|
kfree(root);
|
|
kfree(root);
|
|
}
|
|
}
|