aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ring_buffer.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 8c1b2d290718..54191d6ed195 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2232,12 +2232,12 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer, unsigned long length)
2232 if (ring_buffer_flags != RB_BUFFERS_ON) 2232 if (ring_buffer_flags != RB_BUFFERS_ON)
2233 return NULL; 2233 return NULL;
2234 2234
2235 if (atomic_read(&buffer->record_disabled))
2236 return NULL;
2237
2238 /* If we are tracing schedule, we don't want to recurse */ 2235 /* If we are tracing schedule, we don't want to recurse */
2239 resched = ftrace_preempt_disable(); 2236 resched = ftrace_preempt_disable();
2240 2237
2238 if (atomic_read(&buffer->record_disabled))
2239 goto out_nocheck;
2240
2241 if (trace_recursive_lock()) 2241 if (trace_recursive_lock())
2242 goto out_nocheck; 2242 goto out_nocheck;
2243 2243
@@ -2469,11 +2469,11 @@ int ring_buffer_write(struct ring_buffer *buffer,
2469 if (ring_buffer_flags != RB_BUFFERS_ON) 2469 if (ring_buffer_flags != RB_BUFFERS_ON)
2470 return -EBUSY; 2470 return -EBUSY;
2471 2471
2472 if (atomic_read(&buffer->record_disabled))
2473 return -EBUSY;
2474
2475 resched = ftrace_preempt_disable(); 2472 resched = ftrace_preempt_disable();
2476 2473
2474 if (atomic_read(&buffer->record_disabled))
2475 goto out;
2476
2477 cpu = raw_smp_processor_id(); 2477 cpu = raw_smp_processor_id();
2478 2478
2479 if (!cpumask_test_cpu(cpu, buffer->cpumask)) 2479 if (!cpumask_test_cpu(cpu, buffer->cpumask))