diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-20 21:11:21 -0400 |
commit | 0d9cabdccedb79ee5f27b77ff51f29a9e7d23275 (patch) | |
tree | 8bfb64c3672d058eb90aec3c3a9c4f61cef9097c /block | |
parent | 701085b219016d38f105b031381b9cee6200253a (diff) | |
parent | 3ce3230a0cff484e5130153f244d4fb8a56b3a8b (diff) |
Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo:
"Out of the 8 commits, one fixes a long-standing locking issue around
tasklist walking and others are cleanups."
* 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
cgroup: Walk task list under tasklist_lock in cgroup_enable_task_cg_list
cgroup: Remove wrong comment on cgroup_enable_task_cg_list()
cgroup: remove cgroup_subsys argument from callbacks
cgroup: remove extra calls to find_existing_css_set
cgroup: replace tasklist_lock with rcu_read_lock
cgroup: simplify double-check locking in cgroup_attach_proc
cgroup: move struct cgroup_pidlist out from the header file
cgroup: remove cgroup_attach_task_current_cg()
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 75642a352a8f..ea84a23d5e68 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -28,13 +28,10 @@ static LIST_HEAD(blkio_list); | |||
28 | struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT }; | 28 | struct blkio_cgroup blkio_root_cgroup = { .weight = 2*BLKIO_WEIGHT_DEFAULT }; |
29 | EXPORT_SYMBOL_GPL(blkio_root_cgroup); | 29 | EXPORT_SYMBOL_GPL(blkio_root_cgroup); |
30 | 30 | ||
31 | static struct cgroup_subsys_state *blkiocg_create(struct cgroup_subsys *, | 31 | static struct cgroup_subsys_state *blkiocg_create(struct cgroup *); |
32 | struct cgroup *); | 32 | static int blkiocg_can_attach(struct cgroup *, struct cgroup_taskset *); |
33 | static int blkiocg_can_attach(struct cgroup_subsys *, struct cgroup *, | 33 | static void blkiocg_attach(struct cgroup *, struct cgroup_taskset *); |
34 | struct cgroup_taskset *); | 34 | static void blkiocg_destroy(struct cgroup *); |
35 | static void blkiocg_attach(struct cgroup_subsys *, struct cgroup *, | ||
36 | struct cgroup_taskset *); | ||
37 | static void blkiocg_destroy(struct cgroup_subsys *, struct cgroup *); | ||
38 | static int blkiocg_populate(struct cgroup_subsys *, struct cgroup *); | 35 | static 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 | ||
1551 | static void blkiocg_destroy(struct cgroup_subsys *subsys, struct cgroup *cgroup) | 1548 | static 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 | ||
1601 | static struct cgroup_subsys_state * | 1598 | static struct cgroup_subsys_state *blkiocg_create(struct cgroup *cgroup) |
1602 | blkiocg_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 | */ |
1631 | static int blkiocg_can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 1627 | static 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 | ||
1651 | static void blkiocg_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | 1646 | static 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; |