diff options
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 10a1aee2309e..42a0e9191af5 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -687,8 +687,11 @@ group_sched_in(struct perf_event *group_event, | |||
687 | if (txn) | 687 | if (txn) |
688 | pmu->start_txn(pmu); | 688 | pmu->start_txn(pmu); |
689 | 689 | ||
690 | if (event_sched_in(group_event, cpuctx, ctx)) | 690 | if (event_sched_in(group_event, cpuctx, ctx)) { |
691 | if (txn) | ||
692 | pmu->cancel_txn(pmu); | ||
691 | return -EAGAIN; | 693 | return -EAGAIN; |
694 | } | ||
692 | 695 | ||
693 | /* | 696 | /* |
694 | * Schedule in siblings as one group (if any): | 697 | * Schedule in siblings as one group (if any): |
@@ -710,9 +713,6 @@ group_sched_in(struct perf_event *group_event, | |||
710 | } | 713 | } |
711 | 714 | ||
712 | group_error: | 715 | group_error: |
713 | if (txn) | ||
714 | pmu->cancel_txn(pmu); | ||
715 | |||
716 | /* | 716 | /* |
717 | * Groups can be scheduled in as one unit only, so undo any | 717 | * Groups can be scheduled in as one unit only, so undo any |
718 | * partial group before returning: | 718 | * partial group before returning: |
@@ -724,6 +724,9 @@ group_error: | |||
724 | } | 724 | } |
725 | event_sched_out(group_event, cpuctx, ctx); | 725 | event_sched_out(group_event, cpuctx, ctx); |
726 | 726 | ||
727 | if (txn) | ||
728 | pmu->cancel_txn(pmu); | ||
729 | |||
727 | return -EAGAIN; | 730 | return -EAGAIN; |
728 | } | 731 | } |
729 | 732 | ||