aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/cpu_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile/cpu_buffer.c')
-rw-r--r--drivers/oprofile/cpu_buffer.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index b8ef8ddcc292..8aa73fac6ad4 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -451,14 +451,9 @@ static void wq_sync_buffer(struct work_struct *work)
451{ 451{
452 struct oprofile_cpu_buffer *b = 452 struct oprofile_cpu_buffer *b =
453 container_of(work, struct oprofile_cpu_buffer, work.work); 453 container_of(work, struct oprofile_cpu_buffer, work.work);
454 if (b->cpu != smp_processor_id()) { 454 if (b->cpu != smp_processor_id() && !cpu_online(b->cpu)) {
455 printk(KERN_DEBUG "WQ on CPU%d, prefer CPU%d\n", 455 cancel_delayed_work(&b->work);
456 smp_processor_id(), b->cpu); 456 return;
457
458 if (!cpu_online(b->cpu)) {
459 cancel_delayed_work(&b->work);
460 return;
461 }
462 } 457 }
463 sync_buffer(b->cpu); 458 sync_buffer(b->cpu);
464 459