Skip to content
Commit 4e96ee8e authored by Li Zefan's avatar Li Zefan Committed by Tejun Heo
Browse files

cgroup: convert cgroup_ida to cgroup_idr



This enables us to lookup a cgroup by its id.

v4:
- add a comment for idr_remove() in cgroup_offline_fn().

v3:
- on success, idr_alloc() returns the id but not 0, so fix the BUG_ON()
  in cgroup_init().
- pass the right value to idr_alloc() so that the id for dummy cgroup is 0.

Signed-off-by: default avatarLi Zefan <lizefan@huawei.com>
Reviewed-by: default avatarMichal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 6f4b7e63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment