return ret;
}
- static void blkiocg_attach_task(struct cgroup *cgrp, struct task_struct *tsk)
+ static void blkiocg_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
+ struct cgroup_taskset *tset)
{
+ struct task_struct *task;
struct io_context *ioc;
- /* we don't lose anything even if ioc allocation fails */
- ioc = get_task_io_context(tsk, GFP_ATOMIC, NUMA_NO_NODE);
- if (ioc) {
- ioc_cgroup_changed(ioc);
- put_io_context(ioc, NULL);
+ cgroup_taskset_for_each(task, cgrp, tset) {
- task_lock(task);
- ioc = task->io_context;
- if (ioc)
- ioc->cgroup_changed = 1;
- task_unlock(task);
++ /* we don't lose anything even if ioc allocation fails */
++ ioc = get_task_io_context(task, GFP_ATOMIC, NUMA_NO_NODE);
++ if (ioc) {
++ ioc_cgroup_changed(ioc);
++ put_io_context(ioc, NULL);
++ }
}
}