History

ring-buffer: Drop unneeded check in ring_buffer_resize()

Remove the cpumask check, as we has done it at the beginning of the function. Also fix a typo. s/also the on the/also on the/ Link: https://lkml.kernel.org/r/20201224144634.3210-1-hqjagain@gmail.com

Qiujun Huang committed 5 years ago

Commit c6358ba1 parent 6689bed1 file · +1 −5Browse files

Unified · Split

kernel/trace/ring_buffer.c+1−5
@@ -2059,10 +2059,6 @@ int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size, · 2058 unmodified lines
2059 2059
2060 put_online_cpus();2060 put_online_cpus();
2061 } else {2061 } else {
2062 /* Make sure this CPU has been initialized */
2063 if (!cpumask_test_cpu(cpu_id, buffer->cpumask))
2064 goto out;
2065
2066 cpu_buffer = buffer->buffers[cpu_id];2062 cpu_buffer = buffer->buffers[cpu_id];
2067 2063
2068 if (nr_pages == cpu_buffer->nr_pages)2064 if (nr_pages == cpu_buffer->nr_pages)
@@ -2580,7 +2576,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, · 511 unmodified lines
2580 * have filled up the buffer with events2576 * have filled up the buffer with events
2581 * from interrupts and such, and wrapped.2577 * from interrupts and such, and wrapped.
2582 *2578 *
2583 * Note, if the tail page is also the on the2579 * Note, if the tail page is also on the
2584 * reader_page, we let it move out.2580 * reader_page, we let it move out.
2585 */2581 */
2586 if (unlikely((cpu_buffer->commit_page !=2582 if (unlikely((cpu_buffer->commit_page !=

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t