|
@@ -1120,6 +1120,10 @@ static int __perf_remove_from_context(void *info)
|
|
raw_spin_lock(&ctx->lock);
|
|
raw_spin_lock(&ctx->lock);
|
|
event_sched_out(event, cpuctx, ctx);
|
|
event_sched_out(event, cpuctx, ctx);
|
|
list_del_event(event, ctx);
|
|
list_del_event(event, ctx);
|
|
|
|
+ if (!ctx->nr_events && cpuctx->task_ctx == ctx) {
|
|
|
|
+ ctx->is_active = 0;
|
|
|
|
+ cpuctx->task_ctx = NULL;
|
|
|
|
+ }
|
|
raw_spin_unlock(&ctx->lock);
|
|
raw_spin_unlock(&ctx->lock);
|
|
|
|
|
|
return 0;
|
|
return 0;
|