Skip to contentSkip to conversation

ring-buffer: Drop unneeded check in ring_buffer_resize()

PATCH New Qiujun Huang 1 participant 1 message Dec 24, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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/

---
 kernel/trace/ring_buffer.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
kernel/trace/ring_buffer.c +1 -5
index ec08f948dd80..b8213581e119 100644
@@ -2062,10 +2062,6 @@ int ring_buffer_resize(struct trace_buffer *buffer, unsigned long size,
 
 		put_online_cpus();
 	} else {
-		/* Make sure this CPU has been initialized */
-		if (!cpumask_test_cpu(cpu_id, buffer->cpumask))
-			goto out;
-
 		cpu_buffer = buffer->buffers[cpu_id];
 
 		if (nr_pages == cpu_buffer->nr_pages)
@@ -2583,7 +2579,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
 			 * have filled up the buffer with events
 			 * from interrupts and such, and wrapped.
 			 *
-			 * Note, if the tail page is also the on the
+			 * Note, if the tail page is also on the
 			 * reader_page, we let it move out.
 			 */
 			if (unlikely((cpu_buffer->commit_page !=
Signature · 1 line
2.17.1