Merge tag 'trace-v4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[sfrench/cifs-2.6.git] / kernel / trace / ring_buffer.c
index 5434c16f21922ce10381d91199ee4926e58982df..06e864a334bba16789df45fb0c627721d0d65155 100644 (file)
@@ -1881,7 +1881,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
                 * There could have been a race between checking
                 * record_disable and incrementing it.
                 */
-               synchronize_sched();
+               synchronize_rcu();
                for_each_buffer_cpu(buffer, cpu) {
                        cpu_buffer = buffer->buffers[cpu];
                        rb_check_pages(cpu_buffer);
@@ -3213,7 +3213,7 @@ static bool rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)
  * This prevents all writes to the buffer. Any attempt to write
  * to the buffer after this will fail and return NULL.
  *
- * The caller should call synchronize_sched() after this.
+ * The caller should call synchronize_rcu() after this.
  */
 void ring_buffer_record_disable(struct ring_buffer *buffer)
 {
@@ -3315,7 +3315,7 @@ bool ring_buffer_record_is_set_on(struct ring_buffer *buffer)
  * This prevents all writes to the buffer. Any attempt to write
  * to the buffer after this will fail and return NULL.
  *
- * The caller should call synchronize_sched() after this.
+ * The caller should call synchronize_rcu() after this.
  */
 void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu)
 {
@@ -4255,7 +4255,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_read_prepare);
 void
 ring_buffer_read_prepare_sync(void)
 {
-       synchronize_sched();
+       synchronize_rcu();
 }
 EXPORT_SYMBOL_GPL(ring_buffer_read_prepare_sync);
 
@@ -4431,7 +4431,7 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu)
        atomic_inc(&cpu_buffer->record_disabled);
 
        /* Make sure all commits have finished */
-       synchronize_sched();
+       synchronize_rcu();
 
        raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
 
@@ -4564,7 +4564,7 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
                goto out;
 
        /*
-        * We can't do a synchronize_sched here because this
+        * We can't do a synchronize_rcu here because this
         * function can be called in atomic context.
         * Normally this will be called from the same CPU as cpu.
         * If not it's up to the caller to protect this.