aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 15:09:55 -0400
committerTejun Heo <tj@kernel.org>2012-04-01 15:09:55 -0400
commit6e6ff25bd548a0c5bf5163e4f63e2793dcefbdcb (patch)
treef2c3adbac3286559e88771c714333733e0422760 /kernel/cgroup.c
parent8e3f6541d45e1a002801e56a19530a90f775deba (diff)
cgroup: merge cft_release_agent cftype array into the base files array
Now that cftype can express whether a file should only be on root, cft_release_agent can be merged into the base files cftypes array. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizf@cn.fujitsu.com>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index df8fb82ef350..66c1e3b5c0f2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3732,13 +3732,13 @@ static struct cftype files[] = {
3732 .read_u64 = cgroup_clone_children_read, 3732 .read_u64 = cgroup_clone_children_read,
3733 .write_u64 = cgroup_clone_children_write, 3733 .write_u64 = cgroup_clone_children_write,
3734 }, 3734 },
3735}; 3735 {
3736 3736 .name = "release_agent",
3737static struct cftype cft_release_agent = { 3737 .flags = CFTYPE_ONLY_ON_ROOT,
3738 .name = "release_agent", 3738 .read_seq_string = cgroup_release_agent_show,
3739 .read_seq_string = cgroup_release_agent_show, 3739 .write_string = cgroup_release_agent_write,
3740 .write_string = cgroup_release_agent_write, 3740 .max_write_len = PATH_MAX,
3741 .max_write_len = PATH_MAX, 3741 },
3742}; 3742};
3743 3743
3744static int cgroup_populate_dir(struct cgroup *cgrp) 3744static int cgroup_populate_dir(struct cgroup *cgrp)
@@ -3750,11 +3750,6 @@ static int cgroup_populate_dir(struct cgroup *cgrp)
3750 if (err < 0) 3750 if (err < 0)
3751 return err; 3751 return err;
3752 3752
3753 if (cgrp == cgrp->top_cgroup) {
3754 if ((err = cgroup_add_file(cgrp, NULL, &cft_release_agent)) < 0)
3755 return err;
3756 }
3757
3758 /* process cftsets of each subsystem */ 3753 /* process cftsets of each subsystem */
3759 for_each_subsys(cgrp->root, ss) { 3754 for_each_subsys(cgrp->root, ss) {
3760 struct cftype_set *set; 3755 struct cftype_set *set;