|
@@ -25,7 +25,7 @@ static int ftrace_profile_enable_event(struct ftrace_event_call *event)
|
|
|
char *buf;
|
|
|
int ret = -ENOMEM;
|
|
|
|
|
|
- if (atomic_inc_return(&event->profile_count))
|
|
|
+ if (event->profile_count++ > 0)
|
|
|
return 0;
|
|
|
|
|
|
if (!total_profile_count) {
|
|
@@ -56,7 +56,7 @@ fail_buf_nmi:
|
|
|
perf_trace_buf = NULL;
|
|
|
}
|
|
|
fail_buf:
|
|
|
- atomic_dec(&event->profile_count);
|
|
|
+ event->profile_count--;
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
@@ -83,7 +83,7 @@ static void ftrace_profile_disable_event(struct ftrace_event_call *event)
|
|
|
{
|
|
|
char *buf, *nmi_buf;
|
|
|
|
|
|
- if (!atomic_add_negative(-1, &event->profile_count))
|
|
|
+ if (--event->profile_count > 0)
|
|
|
return;
|
|
|
|
|
|
event->profile_disable(event);
|