Skip to content

Commit

Permalink
ring-buffer: Use rb_page_size() instead of open coded head_page size
Browse files Browse the repository at this point in the history
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: Steven Rostedt <rostedt@goodmis.org>
  • Loading branch information
rostedt committed Jul 23, 2014
1 parent 0162d62 commit 10e83fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -3763,7 +3763,7 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
if (rb_per_cpu_empty(cpu_buffer))
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);
goto again;
}
Expand Down

0 comments on commit 10e83fd

Please sign in to comment.