Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10e83fd0 authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt
Browse files

ring-buffer: Use rb_page_size() instead of open coded head_page size



There's a helper function to get a ring buffer page size (the number
of bytes of data recorded on the page), called rb_page_size().
Use that instead of open coding it.

Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 0162d621
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3763,7 +3763,7 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
	if (rb_per_cpu_empty(cpu_buffer))
	if (rb_per_cpu_empty(cpu_buffer))
		return NULL;
		return NULL;


	if (iter->head >= local_read(&iter->head_page->page->commit)) {
	if (iter->head >= rb_page_size(iter->head_page)) {
		rb_inc_iter(iter);
		rb_inc_iter(iter);
		goto again;
		goto again;
	}
	}