return;
WARN_ON_ONCE(!irqs_disabled());
- if (WARN_ON_ONCE(!tr->allocated_snapshot))
+ if (tr->allocated_snapshot) {
+ /* Only the nop tracer should hit this when disabling */
+ WARN_ON_ONCE(tr->current_trace != &nop_trace);
return;
+ }
arch_spin_lock(&ftrace_max_lock);