diff options
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index b8c143d68ee0..fa8f26309444 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -1655,11 +1655,12 @@ static void blkiocg_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, | |||
1655 | struct io_context *ioc; | 1655 | struct io_context *ioc; |
1656 | 1656 | ||
1657 | cgroup_taskset_for_each(task, cgrp, tset) { | 1657 | cgroup_taskset_for_each(task, cgrp, tset) { |
1658 | task_lock(task); | 1658 | /* we don't lose anything even if ioc allocation fails */ |
1659 | ioc = task->io_context; | 1659 | ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE); |
1660 | if (ioc) | 1660 | if (ioc) { |
1661 | ioc->cgroup_changed = 1; | 1661 | ioc_cgroup_changed(ioc); |
1662 | task_unlock(task); | 1662 | put_io_context(ioc, NULL); |
1663 | } | ||
1663 | } | 1664 | } |
1664 | } | 1665 | } |
1665 | 1666 | ||