diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 5dd017fea6f5..a72c6e03deec 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1787,9 +1787,9 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, | |||
1787 | static struct ring_buffer_event * | 1787 | static struct ring_buffer_event * |
1788 | rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, | 1788 | rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer, |
1789 | unsigned long length, unsigned long tail, | 1789 | unsigned long length, unsigned long tail, |
1790 | struct buffer_page *commit_page, | ||
1791 | struct buffer_page *tail_page, u64 *ts) | 1790 | struct buffer_page *tail_page, u64 *ts) |
1792 | { | 1791 | { |
1792 | struct buffer_page *commit_page = cpu_buffer->commit_page; | ||
1793 | struct ring_buffer *buffer = cpu_buffer->buffer; | 1793 | struct ring_buffer *buffer = cpu_buffer->buffer; |
1794 | struct buffer_page *next_page; | 1794 | struct buffer_page *next_page; |
1795 | int ret; | 1795 | int ret; |
@@ -1892,13 +1892,10 @@ static struct ring_buffer_event * | |||
1892 | __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | 1892 | __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, |
1893 | unsigned type, unsigned long length, u64 *ts) | 1893 | unsigned type, unsigned long length, u64 *ts) |
1894 | { | 1894 | { |
1895 | struct buffer_page *tail_page, *commit_page; | 1895 | struct buffer_page *tail_page; |
1896 | struct ring_buffer_event *event; | 1896 | struct ring_buffer_event *event; |
1897 | unsigned long tail, write; | 1897 | unsigned long tail, write; |
1898 | 1898 | ||
1899 | commit_page = cpu_buffer->commit_page; | ||
1900 | /* we just need to protect against interrupts */ | ||
1901 | barrier(); | ||
1902 | tail_page = cpu_buffer->tail_page; | 1899 | tail_page = cpu_buffer->tail_page; |
1903 | write = local_add_return(length, &tail_page->write); | 1900 | write = local_add_return(length, &tail_page->write); |
1904 | 1901 | ||
@@ -1909,7 +1906,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1909 | /* See if we shot pass the end of this buffer page */ | 1906 | /* See if we shot pass the end of this buffer page */ |
1910 | if (write > BUF_PAGE_SIZE) | 1907 | if (write > BUF_PAGE_SIZE) |
1911 | return rb_move_tail(cpu_buffer, length, tail, | 1908 | return rb_move_tail(cpu_buffer, length, tail, |
1912 | commit_page, tail_page, ts); | 1909 | tail_page, ts); |
1913 | 1910 | ||
1914 | /* We reserved something on the buffer */ | 1911 | /* We reserved something on the buffer */ |
1915 | 1912 | ||