File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -4714,26 +4714,26 @@ int ring_buffer_write(struct trace_buffer *buffer,
4714
4714
int ret = - EBUSY ;
4715
4715
int cpu ;
4716
4716
4717
- preempt_disable_notrace ();
4717
+ guard ( preempt_notrace ) ();
4718
4718
4719
4719
if (atomic_read (& buffer -> record_disabled ))
4720
- goto out ;
4720
+ return - EBUSY ;
4721
4721
4722
4722
cpu = raw_smp_processor_id ();
4723
4723
4724
4724
if (!cpumask_test_cpu (cpu , buffer -> cpumask ))
4725
- goto out ;
4725
+ return - EBUSY ;
4726
4726
4727
4727
cpu_buffer = buffer -> buffers [cpu ];
4728
4728
4729
4729
if (atomic_read (& cpu_buffer -> record_disabled ))
4730
- goto out ;
4730
+ return - EBUSY ;
4731
4731
4732
4732
if (length > buffer -> max_data_size )
4733
- goto out ;
4733
+ return - EBUSY ;
4734
4734
4735
4735
if (unlikely (trace_recursive_lock (cpu_buffer )))
4736
- goto out ;
4736
+ return - EBUSY ;
4737
4737
4738
4738
event = rb_reserve_next_event (buffer , cpu_buffer , length );
4739
4739
if (!event )
@@ -4751,10 +4751,6 @@ int ring_buffer_write(struct trace_buffer *buffer,
4751
4751
4752
4752
out_unlock :
4753
4753
trace_recursive_unlock (cpu_buffer );
4754
-
4755
- out :
4756
- preempt_enable_notrace ();
4757
-
4758
4754
return ret ;
4759
4755
}
4760
4756
EXPORT_SYMBOL_GPL (ring_buffer_write );
You can’t perform that action at this time.
0 commit comments