aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cgroup.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 6b7324431b99..8f70dc0c0c79 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -965,10 +965,12 @@ static void cgroup_rm_file(struct cgroup *cgrp, const struct cftype *cft)
965static void cgroup_clear_dir(struct cgroup *cgrp, unsigned long subsys_mask) 965static void cgroup_clear_dir(struct cgroup *cgrp, unsigned long subsys_mask)
966{ 966{
967 struct cgroup_subsys *ss; 967 struct cgroup_subsys *ss;
968 int i;
968 969
969 for_each_root_subsys(cgrp->root, ss) { 970 for_each_subsys(ss, i) {
970 struct cftype_set *set; 971 struct cftype_set *set;
971 if (!test_bit(ss->subsys_id, &subsys_mask)) 972
973 if (!test_bit(i, &subsys_mask))
972 continue; 974 continue;
973 list_for_each_entry(set, &ss->cftsets, node) 975 list_for_each_entry(set, &ss->cftsets, node)
974 cgroup_addrm_files(cgrp, NULL, set->cfts, false); 976 cgroup_addrm_files(cgrp, NULL, set->cfts, false);
@@ -4177,12 +4179,13 @@ static struct cftype cgroup_base_files[] = {
4177static int cgroup_populate_dir(struct cgroup *cgrp, unsigned long subsys_mask) 4179static int cgroup_populate_dir(struct cgroup *cgrp, unsigned long subsys_mask)
4178{ 4180{
4179 struct cgroup_subsys *ss; 4181 struct cgroup_subsys *ss;
4180 int ret = 0; 4182 int i, ret = 0;
4181 4183
4182 /* process cftsets of each subsystem */ 4184 /* process cftsets of each subsystem */
4183 for_each_root_subsys(cgrp->root, ss) { 4185 for_each_subsys(ss, i) {
4184 struct cftype_set *set; 4186 struct cftype_set *set;
4185 if (!test_bit(ss->subsys_id, &subsys_mask)) 4187
4188 if (!test_bit(i, &subsys_mask))
4186 continue; 4189 continue;
4187 4190
4188 list_for_each_entry(set, &ss->cftsets, node) { 4191 list_for_each_entry(set, &ss->cftsets, node) {