Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 119156
b: refs/heads/master
c: ee51a1d
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Nov 13, 2008
1 parent c9a03d2 commit 3b1f069
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 47e74f2ba8fbf9fb1378e2524e6cfdc2fb37f160
refs/heads/master: ee51a1de7e3837577412be269e0100038068e691
6 changes: 6 additions & 0 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,12 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size)
LIST_HEAD(pages);
int i, cpu;

/*
* Always succeed at resizing a non-existent buffer:
*/
if (!buffer)
return size;

size = DIV_ROUND_UP(size, BUF_PAGE_SIZE);
size *= BUF_PAGE_SIZE;
buffer_size = buffer->pages * BUF_PAGE_SIZE;
Expand Down

0 comments on commit 3b1f069

Please sign in to comment.