ring-buffer: Use subbuf_order for buffer page masking
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 19 Dec 2023 22:38:00 +0000 (17:38 -0500)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 21 Dec 2023 16:04:48 +0000 (11:04 -0500)
commit3cb3091138ca0921c4569bcf7ffa062519639b6a
tree0e60aa77a9cc1ad37ff399c4c1f2741d6ff40427
parent2f84b39f48476615186af5b3220ad5a2c756679b
ring-buffer: Use subbuf_order for buffer page masking

The comparisons to PAGE_SIZE were all converted to use the
buffer->subbuf_order, but the use of PAGE_MASK was missed.

Convert all the PAGE_MASK usages over to:

  (PAGE_SIZE << cpu_buffer->buffer->subbuf_order) - 1

Link: https://lore.kernel.org/linux-trace-kernel/20231219173800.66eefb7a@gandalf.local.home
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com>
Cc: Vincent Donnefort <vdonnefort@google.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Fixes: 139f84002145 ("ring-buffer: Page size per ring buffer")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c