Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130590
b: refs/heads/master
c: 551b404
h: refs/heads/master
v: v3
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Jan 21, 2009
1 parent c1d40b5 commit 3894120
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00f57f545afa422db3003b0d0b30a30f8de7ecb2
refs/heads/master: 551b4048b3d4acf15aff9fe4aed89b892c135b02
10 changes: 5 additions & 5 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,12 +1025,8 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
}

if (next_page == head_page) {
if (!(buffer->flags & RB_FL_OVERWRITE)) {
/* reset write */
if (tail <= BUF_PAGE_SIZE)
local_set(&tail_page->write, tail);
if (!(buffer->flags & RB_FL_OVERWRITE))
goto out_unlock;
}

/* tail_page has not moved yet? */
if (tail_page == cpu_buffer->tail_page) {
Expand Down Expand Up @@ -1105,6 +1101,10 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
return event;

out_unlock:
/* reset write */
if (tail <= BUF_PAGE_SIZE)
local_set(&tail_page->write, tail);

__raw_spin_unlock(&cpu_buffer->lock);
local_irq_restore(flags);
return NULL;
Expand Down

0 comments on commit 3894120

Please sign in to comment.