summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2014-06-12 14:31:31 +0800
committerTejun Heo <tj@kernel.org>2014-06-17 18:52:53 -0400
commit99bae5f94185c2cc65701e95c54e31e2f4345b88 (patch)
tree9cb7db676c228bd7e3ea9fbd221a6303ca2628ee
parentebe06187bf2aec10d537ce4595e416035367d703 (diff)
downloadlinux-99bae5f94185c2cc65701e95c54e31e2f4345b88.tar.gz
linux-99bae5f94185c2cc65701e95c54e31e2f4345b88.tar.bz2
linux-99bae5f94185c2cc65701e95c54e31e2f4345b88.zip
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>
-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)
rcu_read_lock();
css_for_each_child(child, css) {
- if (css->flags & CSS_ONLINE) {
+ if (child->flags & CSS_ONLINE) {
ret = true;
break;
}