aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2014-06-12 02:31:31 -0400
committerTejun Heo <tj@kernel.org>2014-06-17 18:52:53 -0400
commit99bae5f94185c2cc65701e95c54e31e2f4345b88 (patch)
tree9cb7db676c228bd7e3ea9fbd221a6303ca2628ee /kernel
parentebe06187bf2aec10d537ce4595e416035367d703 (diff)
cgroup: fix broken css_has_online_children()
After running: # mount -t cgroup cpu xxx /cgroup && mkdir /cgroup/sub && \ rmdir /cgroup/sub && umount /cgroup I found the cgroup root still existed: # cat /proc/cgroups #subsys_name hierarchy num_cgroups enabled cpuset 0 1 1 cpu 1 1 1 ... It turned out css_has_online_children() is broken. Signed-off-by: Li Zefan <lizefan@huawei.com> Sigend-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 7868fc3c0bc5..d9a8be911f5b 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3328,7 +3328,7 @@ bool css_has_online_children(struct cgroup_subsys_state *css)
3328 3328
3329 rcu_read_lock(); 3329 rcu_read_lock();
3330 css_for_each_child(child, css) { 3330 css_for_each_child(child, css) {
3331 if (css->flags & CSS_ONLINE) { 3331 if (child->flags & CSS_ONLINE) {
3332 ret = true; 3332 ret = true;
3333 break; 3333 break;
3334 } 3334 }