aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2012-01-31 00:47:36 -0500
committerTejun Heo <tj@kernel.org>2012-02-02 12:20:22 -0500
commit761b3ef50e1c2649cffbfa67a4dcb2dcdb7982ed (patch)
tree67ab6a9a2520811c9c0b4d70d1c19b4bfca16237 /block
parent61d1d219c4c0761059236a46867bc49943c4d29d (diff)
cgroup: remove cgroup_subsys argument from callbacks
The argument is not used at all, and it's not necessary, because a specific callback handler of course knows which subsys it belongs to. Now only ->pupulate() takes this argument, because the handlers of this callback always call cgroup_add_file()/cgroup_add_files(). So we reduce a few lines of code, though the shrinking of object size is minimal. 16 files changed, 113 insertions(+), 162 deletions(-) text data bss dec hex filename 5486240 656987 7039960 13183187 c928d3 vmlinux.o.orig 5486170 656987 7039960 13183117 c9288d vmlinux.o Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block')
-rw-r--r--block/blk-cgroup.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index fa8f26309444..1359d637831f 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -28,13 +28,10 @@ static LIST_HEAD(blkio_list);
28struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT }; 28struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT };
29EXPORT_SYMBOL_GPL(blkio_root_cgroup); 29EXPORT_SYMBOL_GPL(blkio_root_cgroup);
30 30
31static struct cgroup_subsys_state *blkiocg_create(struct cgroup_subsys *, 31static struct cgroup_subsys_state *blkiocg_create(struct cgroup *);
32 struct cgroup *); 32static int blkiocg_can_attach(struct cgroup *, struct cgroup_taskset *);
33static int blkiocg_can_attach(struct cgroup_subsys *, struct cgroup *, 33static void blkiocg_attach(struct cgroup *, struct cgroup_taskset *);
34 struct cgroup_taskset *); 34static void blkiocg_destroy(struct cgroup *);
35static void blkiocg_attach(struct cgroup_subsys *, struct cgroup *,
36 struct cgroup_taskset *);
37static void blkiocg_destroy(struct cgroup_subsys *, struct cgroup *);
38static int blkiocg_populate(struct cgroup_subsys *, struct cgroup *); 35static int blkiocg_populate(struct cgroup_subsys *, struct cgroup *);
39 36
40/* for encoding cft->private value on file */ 37/* for encoding cft->private value on file */
@@ -1548,7 +1545,7 @@ static int blkiocg_populate(struct cgroup_subsys *subsys, struct cgroup *cgroup)
1548 ARRAY_SIZE(blkio_files)); 1545 ARRAY_SIZE(blkio_files));
1549} 1546}
1550 1547
1551static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup) 1548static void blkiocg_destroy(struct cgroup *cgroup)
1552{ 1549{
1553 struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup); 1550 struct blkio_cgroup *blkcg = cgroup_to_blkio_cgroup(cgroup);
1554 unsigned long flags; 1551 unsigned long flags;
@@ -1598,8 +1595,7 @@ static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup)
1598 kfree(blkcg); 1595 kfree(blkcg);
1599} 1596}
1600 1597
1601static struct cgroup_subsys_state * 1598static struct cgroup_subsys_state *blkiocg_create(struct cgroup *cgroup)
1602blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)
1603{ 1599{
1604 struct blkio_cgroup *blkcg; 1600 struct blkio_cgroup *blkcg;
1605 struct cgroup *parent = cgroup->parent; 1601 struct cgroup *parent = cgroup->parent;
@@ -1628,8 +1624,7 @@ done:
1628 * of the main cic data structures. For now we allow a task to change 1624 * of the main cic data structures. For now we allow a task to change
1629 * its cgroup only if it's the only owner of its ioc. 1625 * its cgroup only if it's the only owner of its ioc.
1630 */ 1626 */
1631static int blkiocg_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 1627static int blkiocg_can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
1632 struct cgroup_taskset *tset)
1633{ 1628{
1634 struct task_struct *task; 1629 struct task_struct *task;
1635 struct io_context *ioc; 1630 struct io_context *ioc;
@@ -1648,8 +1643,7 @@ static int blkiocg_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
1648 return ret; 1643 return ret;
1649} 1644}
1650 1645
1651static void blkiocg_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, 1646static void blkiocg_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
1652 struct cgroup_taskset *tset)
1653{ 1647{
1654 struct task_struct *task; 1648 struct task_struct *task;
1655 struct io_context *ioc; 1649 struct io_context *ioc;