aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
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;