summaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-07-23 19:45:12 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-07-23 19:45:12 -0400
commit10e83fd01ccbb7122ad2c9dce68fb01bebb3fc46 (patch)
tree0643420cd3f825c33a3802113a6fe635e4b090b2 /kernel/trace/ring_buffer.c
parent0162d621ddf3bd02bf7de324dcf002d9c84c5059 (diff)
downloadlinux-10e83fd01ccbb7122ad2c9dce68fb01bebb3fc46.tar.bz2
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: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 35825a87d6a3..d8c267ec5cca 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -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;
}