diff options
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index c3d1802a9b30..50b94113f4f7 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -3271,8 +3271,17 @@ int cgroup_add_legacy_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) | |||
3271 | { | 3271 | { |
3272 | struct cftype *cft; | 3272 | struct cftype *cft; |
3273 | 3273 | ||
3274 | for (cft = cfts; cft && cft->name[0] != '\0'; cft++) | 3274 | /* |
3275 | cft->flags |= __CFTYPE_NOT_ON_DFL; | 3275 | * If legacy_flies_on_dfl, we want to show the legacy files on the |
3276 | * dfl hierarchy but iff the target subsystem hasn't been updated | ||
3277 | * for the dfl hierarchy yet. | ||
3278 | */ | ||
3279 | if (!cgroup_legacy_files_on_dfl || | ||
3280 | ss->dfl_cftypes != ss->legacy_cftypes) { | ||
3281 | for (cft = cfts; cft && cft->name[0] != '\0'; cft++) | ||
3282 | cft->flags |= __CFTYPE_NOT_ON_DFL; | ||
3283 | } | ||
3284 | |||
3276 | return cgroup_add_cftypes(ss, cfts); | 3285 | return cgroup_add_cftypes(ss, cfts); |
3277 | } | 3286 | } |
3278 | 3287 | ||