History

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.

Steven Rostedt (Red Hat) committed 12 years ago

Commit 10e83fd1 parent 0162d621 file · +1 −1Browse files

Showing the changes to kernel/trace (1 of 1 file). Show all

Unified · Split

kernel/trace/ring_buffer.c+1−1
@@ -3763,7 +3763,7 @@ rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts) · 3762 unmodified lines
3763 if (rb_per_cpu_empty(cpu_buffer))3763 if (rb_per_cpu_empty(cpu_buffer))
3764 return NULL;3764 return NULL;
3765 3765
3766 if (iter->head >= local_read(&iter->head_page->page->commit)) {3766 if (iter->head >= rb_page_size(iter->head_page)) {
3767 rb_inc_iter(iter);3767 rb_inc_iter(iter);
3768 goto again;3768 goto again;
3769 }3769 }