diff options
| author | Ingo Molnar <mingo@kernel.org> | 2016-01-06 11:02:29 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2016-01-06 11:02:29 +0100 |
| commit | 567bee2803cb46caeb6011de5b738fde33dc3896 (patch) | |
| tree | 05bab01377bffa356bfbe06c4b6193b23b7c24ca /include/linux/perf_event.h | |
| parent | aa0b7ae06387d40a988ce16a189082dee6e570bc (diff) | |
| parent | 093e5840ae76f1082633503964d035f40ed0216d (diff) | |
Merge branch 'sched/urgent' into sched/core, to pick up fixes before merging new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/perf_event.h')
| -rw-r--r-- | include/linux/perf_event.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index d841d33bcdc9..f9828a48f16a 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -697,9 +697,11 @@ struct perf_cgroup { * if there is no cgroup event for the current CPU context. */ static inline struct perf_cgroup * -perf_cgroup_from_task(struct task_struct *task) +perf_cgroup_from_task(struct task_struct *task, struct perf_event_context *ctx) { - return container_of(task_css(task, perf_event_cgrp_id), + return container_of(task_css_check(task, perf_event_cgrp_id, + ctx ? lockdep_is_held(&ctx->lock) + : true), struct perf_cgroup, css); } #endif /* CONFIG_CGROUP_PERF */ |
