aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ring_buffer.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-04-08 03:06:12 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-08 04:18:47 -0400
commitc1ab9cab75098924fa8226a8a371de66977439df (patch)
tree767e77302ca8f2eb781c60624bc8518cd50ba6eb /kernel/trace/ring_buffer.c
parentff0ff84a0767df48d728c36510365344a7e7d582 (diff)
parentf5284e7635787224dda1a2bf82a4c56b1c75671f (diff)
Merge branch 'linus' into tracing/core
Conflicts: include/linux/module.h kernel/module.c Semantic conflict: include/trace/events/module.h Merge reason: Resolve the conflict with upstream commit 5fbfb18 ("Fix up possibly racy module refcounting") Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r--kernel/trace/ring_buffer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index dc6d563a6d22..5885cdfc41f3 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -14,6 +14,7 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/percpu.h> 15#include <linux/percpu.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <linux/slab.h>
17#include <linux/init.h> 18#include <linux/init.h>
18#include <linux/hash.h> 19#include <linux/hash.h>
19#include <linux/list.h> 20#include <linux/list.h>
@@ -1223,18 +1224,19 @@ rb_remove_pages(struct ring_buffer_per_cpu *cpu_buffer, unsigned nr_pages)
1223 1224
1224 for (i = 0; i < nr_pages; i++) { 1225 for (i = 0; i < nr_pages; i++) {
1225 if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) 1226 if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages)))
1226 return; 1227 goto out;
1227 p = cpu_buffer->pages->next; 1228 p = cpu_buffer->pages->next;
1228 bpage = list_entry(p, struct buffer_page, list); 1229 bpage = list_entry(p, struct buffer_page, list);
1229 list_del_init(&bpage->list); 1230 list_del_init(&bpage->list);
1230 free_buffer_page(bpage); 1231 free_buffer_page(bpage);
1231 } 1232 }
1232 if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages))) 1233 if (RB_WARN_ON(cpu_buffer, list_empty(cpu_buffer->pages)))
1233 return; 1234 goto out;
1234 1235
1235 rb_reset_cpu(cpu_buffer); 1236 rb_reset_cpu(cpu_buffer);
1236 rb_check_pages(cpu_buffer); 1237 rb_check_pages(cpu_buffer);
1237 1238
1239out:
1238 spin_unlock_irq(&cpu_buffer->reader_lock); 1240 spin_unlock_irq(&cpu_buffer->reader_lock);
1239} 1241}
1240 1242
@@ -1251,7 +1253,7 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer,
1251 1253
1252 for (i = 0; i < nr_pages; i++) { 1254 for (i = 0; i < nr_pages; i++) {
1253 if (RB_WARN_ON(cpu_buffer, list_empty(pages))) 1255 if (RB_WARN_ON(cpu_buffer, list_empty(pages)))
1254 return; 1256 goto out;
1255 p = pages->next; 1257 p = pages->next;
1256 bpage = list_entry(p, struct buffer_page, list); 1258 bpage = list_entry(p, struct buffer_page, list);
1257 list_del_init(&bpage->list); 1259 list_del_init(&bpage->list);
@@ -1260,6 +1262,7 @@ rb_insert_pages(struct ring_buffer_per_cpu *cpu_buffer,
1260 rb_reset_cpu(cpu_buffer); 1262 rb_reset_cpu(cpu_buffer);
1261 rb_check_pages(cpu_buffer); 1263 rb_check_pages(cpu_buffer);
1262 1264
1265out:
1263 spin_unlock_irq(&cpu_buffer->reader_lock); 1266 spin_unlock_irq(&cpu_buffer->reader_lock);
1264} 1267}
1265 1268