summaryrefslogtreecommitdiff
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-04-01 12:09:55 -0700
committerTejun Heo <tj@kernel.org>2012-04-01 12:09:55 -0700
commit4baf6e33251b37f111e21289f8ee71fe4cce236e (patch)
tree7decc386a60679fd2696041810cf331c0daf1f41 /kernel/cgroup.c
parent676f7c8f84d15e94065841529016da5ab92e901b (diff)
downloadlwn-4baf6e33251b37f111e21289f8ee71fe4cce236e.tar.gz
lwn-4baf6e33251b37f111e21289f8ee71fe4cce236e.zip
cgroup: convert all non-memcg controllers to the new cftype interface
Convert debug, freezer, cpuset, cpu_cgroup, cpuacct, net_prio, blkio, net_cls and device controllers to use the new cftype based interface. Termination entry is added to cftype arrays and populate callbacks are replaced with cgroup_subsys->base_cftypes initializations. This is functionally identical transformation. There shouldn't be any visible behavior change. memcg is rather special and will be converted separately. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Paul Menage <paul@paulmenage.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 66c1e3b5c0f2..835ae29e4ea2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5349,19 +5349,15 @@ static struct cftype debug_files[] = {
.name = "releasable",
.read_u64 = releasable_read,
},
-};
-static int debug_populate(struct cgroup_subsys *ss, struct cgroup *cont)
-{
- return cgroup_add_files(cont, ss, debug_files,
- ARRAY_SIZE(debug_files));
-}
+ { } /* terminate */
+};
struct cgroup_subsys debug_subsys = {
.name = "debug",
.create = debug_create,
.destroy = debug_destroy,
- .populate = debug_populate,
.subsys_id = debug_subsys_id,
+ .base_cftypes = debug_files,
};
#endif /* CONFIG_CGROUP_DEBUG */