diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 15:09:55 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 15:09:55 -0400 |
commit | 4baf6e33251b37f111e21289f8ee71fe4cce236e (patch) | |
tree | 7decc386a60679fd2696041810cf331c0daf1f41 /kernel/cgroup.c | |
parent | 676f7c8f84d15e94065841529016da5ab92e901b (diff) |
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.c | 10 |
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[] = { | |||
5349 | .name = "releasable", | 5349 | .name = "releasable", |
5350 | .read_u64 = releasable_read, | 5350 | .read_u64 = releasable_read, |
5351 | }, | 5351 | }, |
5352 | }; | ||
5353 | 5352 | ||
5354 | static int debug_populate(struct cgroup_subsys *ss, struct cgroup *cont) | 5353 | { } /* terminate */ |
5355 | { | 5354 | }; |
5356 | return cgroup_add_files(cont, ss, debug_files, | ||
5357 | ARRAY_SIZE(debug_files)); | ||
5358 | } | ||
5359 | 5355 | ||
5360 | struct cgroup_subsys debug_subsys = { | 5356 | struct cgroup_subsys debug_subsys = { |
5361 | .name = "debug", | 5357 | .name = "debug", |
5362 | .create = debug_create, | 5358 | .create = debug_create, |
5363 | .destroy = debug_destroy, | 5359 | .destroy = debug_destroy, |
5364 | .populate = debug_populate, | ||
5365 | .subsys_id = debug_subsys_id, | 5360 | .subsys_id = debug_subsys_id, |
5361 | .base_cftypes = debug_files, | ||
5366 | }; | 5362 | }; |
5367 | #endif /* CONFIG_CGROUP_DEBUG */ | 5363 | #endif /* CONFIG_CGROUP_DEBUG */ |