summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-04-23 11:13:14 -0400
committerTejun Heo <tj@kernel.org>2014-04-23 11:13:14 -0400
commitea8fd3b47ff4ed4b1b5942bf3e0cb8d8f590ec59 (patch)
tree310f88c83051e81bd2dc6f2f561ab41ae066b4a2
parente37a06f10994c2ba86f54d8f96734f2483a869b8 (diff)
downloadlinux-ea8fd3b47ff4ed4b1b5942bf3e0cb8d8f590ec59.tar.gz
linux-ea8fd3b47ff4ed4b1b5942bf3e0cb8d8f590ec59.tar.bz2
linux-ea8fd3b47ff4ed4b1b5942bf3e0cb8d8f590ec59.zip
cgroup: cgroup_apply_cftypes() shouldn't skip the default hierarhcy
cgroup_apply_cftypes() skip creating or removing files if the subsystem is attached to the default hierarchy, which led to missing files in the root of the default hierarchy. Skipping made sense when the default hierarchy was dummy; however, now that the default hierarchy is full functional and planned to be used as the unified hierarchy, it shouldn't be skipped over. Reported-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com>
-rw-r--r--kernel/cgroup.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 11a03d67635a..a6894272353b 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2436,10 +2436,6 @@ static int cgroup_apply_cftypes(struct cftype *cfts, bool is_add)
lockdep_assert_held(&cgroup_tree_mutex);
- /* don't bother if @ss isn't attached */
- if (ss->root == &cgrp_dfl_root)
- return 0;
-
/* add/rm files for all cgroups created before */
css_for_each_descendant_pre(css, cgroup_css(root, ss)) {
struct cgroup *cgrp = css->cgroup;