[PATCH v4 3/8] cgroup: implement cgroup_from_id()

2013-07-30 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. v4: - also check if cggroup_mutex is held. - make it an inline function. Signed-off-by: Li Zefan Reviewed-by: Michal Hocko ---

[PATCH v4 3/8] cgroup: implement cgroup_from_id()

2013-07-30 Thread Li Zefan
This will be used as a replacement for css_lookup(). There's a difference with cgroup id and css id. cgroup id starts with 0, while css id starts with 1. v4: - also check if cggroup_mutex is held. - make it an inline function. Signed-off-by: Li Zefan lize...@huawei.com Reviewed-by: Michal Hocko