提交 99bae5f9 编写于 作者: L Li Zefan 提交者: Tejun Heo

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: NLi Zefan <lizefan@huawei.com>
Sigend-off-by: NTejun Heo <tj@kernel.org>
上级 ebe06187
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册