diff options
author | Tejun Heo <tj@kernel.org> | 2014-03-19 10:23:55 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-03-19 10:23:55 -0400 |
commit | 8cbbf2c972c4444cad36f61cd571714c39b8cf04 (patch) | |
tree | fe3f24371e5f48023b319e217951fe48b66fc3ee /kernel | |
parent | a2dd424750807f83632a2a70293961086fd8f870 (diff) |
cgroup: implement CFTYPE_ONLY_ON_DFL
This cftype flag makes the file only appear on the default hierarchy.
This will later be used for cgroup.controllers file.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cgroup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 69b4939e9f6d..37b6d534b0ca 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2356,6 +2356,8 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[], | |||
2356 | 2356 | ||
2357 | for (cft = cfts; cft->name[0] != '\0'; cft++) { | 2357 | for (cft = cfts; cft->name[0] != '\0'; cft++) { |
2358 | /* does cft->flags tell us to skip this file on @cgrp? */ | 2358 | /* does cft->flags tell us to skip this file on @cgrp? */ |
2359 | if ((cft->flags & CFTYPE_ONLY_ON_DFL) && !cgroup_on_dfl(cgrp)) | ||
2360 | continue; | ||
2359 | if ((cft->flags & CFTYPE_INSANE) && cgroup_sane_behavior(cgrp)) | 2361 | if ((cft->flags & CFTYPE_INSANE) && cgroup_sane_behavior(cgrp)) |
2360 | continue; | 2362 | continue; |
2361 | if ((cft->flags & CFTYPE_NOT_ON_ROOT) && !cgrp->parent) | 2363 | if ((cft->flags & CFTYPE_NOT_ON_ROOT) && !cgrp->parent) |