return 0;
}
- static void cgrp_attach(struct cgroup_taskset *tset)
+ static void update_classid(struct cgroup_subsys_state *css, void *v)
{
+ struct css_task_iter it;
struct task_struct *p;
- struct cgroup_subsys_state *css;
-
- cgroup_taskset_for_each(p, css, tset) {
- struct cgroup_cls_state *cs = css_cls_state(css);
- void *v = (void *)(unsigned long)cs->classid;
+ css_task_iter_start(css, &it);
+ while ((p = css_task_iter_next(&it))) {
task_lock(p);
- iterate_fd(p->files, 0, update_classid, v);
+ iterate_fd(p->files, 0, update_classid_sock, v);
task_unlock(p);
}
-static void cgrp_attach(struct cgroup_subsys_state *css,
- struct cgroup_taskset *tset)
+ css_task_iter_end(&it);
+ }
+
++static void cgrp_attach(struct cgroup_taskset *tset)
+ {
++ struct cgroup_subsys_state *css;
++
++ cgroup_taskset_first(tset, &css);
+ update_classid(css,
+ (void *)(unsigned long)css_cls_state(css)->classid);
}
static u64 read_classid(struct cgroup_subsys_state *css, struct cftype *cft)