diff options
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r-- | kernel/events/core.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 3afc68c08433..a8f4ac001a00 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -6941,10 +6941,13 @@ static int __perf_cgroup_move(void *info) | |||
6941 | return 0; | 6941 | return 0; |
6942 | } | 6942 | } |
6943 | 6943 | ||
6944 | static void | 6944 | static void perf_cgroup_attach(struct cgroup_subsys *ss, struct cgroup *cgrp, |
6945 | perf_cgroup_attach_task(struct cgroup *cgrp, struct task_struct *task) | 6945 | struct cgroup_taskset *tset) |
6946 | { | 6946 | { |
6947 | task_function_call(task, __perf_cgroup_move, task); | 6947 | struct task_struct *task; |
6948 | |||
6949 | cgroup_taskset_for_each(task, cgrp, tset) | ||
6950 | task_function_call(task, __perf_cgroup_move, task); | ||
6948 | } | 6951 | } |
6949 | 6952 | ||
6950 | static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, | 6953 | static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, |
@@ -6958,7 +6961,7 @@ static void perf_cgroup_exit(struct cgroup_subsys *ss, struct cgroup *cgrp, | |||
6958 | if (!(task->flags & PF_EXITING)) | 6961 | if (!(task->flags & PF_EXITING)) |
6959 | return; | 6962 | return; |
6960 | 6963 | ||
6961 | perf_cgroup_attach_task(cgrp, task); | 6964 | task_function_call(task, __perf_cgroup_move, task); |
6962 | } | 6965 | } |
6963 | 6966 | ||
6964 | struct cgroup_subsys perf_subsys = { | 6967 | struct cgroup_subsys perf_subsys = { |
@@ -6967,6 +6970,6 @@ struct cgroup_subsys perf_subsys = { | |||
6967 | .create = perf_cgroup_create, | 6970 | .create = perf_cgroup_create, |
6968 | .destroy = perf_cgroup_destroy, | 6971 | .destroy = perf_cgroup_destroy, |
6969 | .exit = perf_cgroup_exit, | 6972 | .exit = perf_cgroup_exit, |
6970 | .attach_task = perf_cgroup_attach_task, | 6973 | .attach = perf_cgroup_attach, |
6971 | }; | 6974 | }; |
6972 | #endif /* CONFIG_CGROUP_PERF */ | 6975 | #endif /* CONFIG_CGROUP_PERF */ |