提交 41be4da4 编写于 作者: S Steven Rostedt

ring-buffer: reset write field for ring_buffer_read_page

Impact: fix ring_buffer_read_page

After a page is swapped into the ring buffer, the write field must
also be reset.
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
上级 633ddaa7
......@@ -2492,6 +2492,7 @@ int ring_buffer_read_page(struct ring_buffer *buffer,
rb_init_page(bpage);
bpage = cpu_buffer->reader_page->page;
cpu_buffer->reader_page->page = *data_page;
local_set(&cpu_buffer->reader_page->write, 0);
cpu_buffer->reader_page->read = 0;
*data_page = bpage;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册