diff options
author | Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> | 2009-09-25 01:54:01 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-01 03:30:44 -0400 |
commit | 27f9994c50e95f3a5a81fe4c7491a9f9cffe6ec0 (patch) | |
tree | 0bab616325b5ebd3529842e1082f7a32fd87c149 /kernel | |
parent | 8c9ed8e14c342ec5e7f27e7e498f62409a10eb29 (diff) |
perf_event: Clean up perf_event_init_task()
While at it: we can traverse ctx->group_list to get all
group leader, it should be safe since we hold ctx->mutex.
Changlog v1->v2:
- remove WARN_ON_ONCE() according to Peter Zijlstra's suggestion
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4ABC5AF9.6060808@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/perf_event.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index e50543db642a..e491fb087939 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -4767,9 +4767,7 @@ int perf_event_init_task(struct task_struct *child) | |||
4767 | * We dont have to disable NMIs - we are only looking at | 4767 | * We dont have to disable NMIs - we are only looking at |
4768 | * the list, not manipulating it: | 4768 | * the list, not manipulating it: |
4769 | */ | 4769 | */ |
4770 | list_for_each_entry_rcu(event, &parent_ctx->event_list, event_entry) { | 4770 | list_for_each_entry(event, &parent_ctx->group_list, group_entry) { |
4771 | if (event != event->group_leader) | ||
4772 | continue; | ||
4773 | 4771 | ||
4774 | if (!event->attr.inherit) { | 4772 | if (!event->attr.inherit) { |
4775 | inherited_all = 0; | 4773 | inherited_all = 0; |