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 /block/blk-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 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 60ef16d6d155..126c341955de 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -1515,14 +1515,9 @@ struct cftype blkio_files[] = { | |||
1515 | .read_map = blkiocg_file_read_map, | 1515 | .read_map = blkiocg_file_read_map, |
1516 | }, | 1516 | }, |
1517 | #endif | 1517 | #endif |
1518 | { } /* terminate */ | ||
1518 | }; | 1519 | }; |
1519 | 1520 | ||
1520 | static int blkiocg_populate(struct cgroup_subsys *subsys, struct cgroup *cgroup) | ||
1521 | { | ||
1522 | return cgroup_add_files(cgroup, subsys, blkio_files, | ||
1523 | ARRAY_SIZE(blkio_files)); | ||
1524 | } | ||
1525 | |||
1526 | static void blkiocg_destroy(struct cgroup *cgroup) | 1521 | static void blkiocg_destroy(struct cgroup *cgroup) |
1527 | { | 1522 | { |
1528 | struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup); | 1523 | struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup); |
@@ -1642,11 +1637,11 @@ struct cgroup_subsys blkio_subsys = { | |||
1642 | .can_attach = blkiocg_can_attach, | 1637 | .can_attach = blkiocg_can_attach, |
1643 | .attach = blkiocg_attach, | 1638 | .attach = blkiocg_attach, |
1644 | .destroy = blkiocg_destroy, | 1639 | .destroy = blkiocg_destroy, |
1645 | .populate = blkiocg_populate, | ||
1646 | #ifdef CONFIG_BLK_CGROUP | 1640 | #ifdef CONFIG_BLK_CGROUP |
1647 | /* note: blkio_subsys_id is otherwise defined in blk-cgroup.h */ | 1641 | /* note: blkio_subsys_id is otherwise defined in blk-cgroup.h */ |
1648 | .subsys_id = blkio_subsys_id, | 1642 | .subsys_id = blkio_subsys_id, |
1649 | #endif | 1643 | #endif |
1644 | .base_cftypes = blkio_files, | ||
1650 | .use_id = 1, | 1645 | .use_id = 1, |
1651 | .module = THIS_MODULE, | 1646 | .module = THIS_MODULE, |
1652 | }; | 1647 | }; |