diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 742cbbe49bdc..a3da07c5af28 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -233,7 +233,7 @@ static void delayed_work_timer_fn(unsigned long __data) | |||
233 | /** | 233 | /** |
234 | * queue_delayed_work - queue work on a workqueue after delay | 234 | * queue_delayed_work - queue work on a workqueue after delay |
235 | * @wq: workqueue to use | 235 | * @wq: workqueue to use |
236 | * @work: delayable work to queue | 236 | * @dwork: delayable work to queue |
237 | * @delay: number of jiffies to wait before queueing | 237 | * @delay: number of jiffies to wait before queueing |
238 | * | 238 | * |
239 | * Returns 0 if @work was already on a queue, non-zero otherwise. | 239 | * Returns 0 if @work was already on a queue, non-zero otherwise. |
@@ -268,7 +268,7 @@ EXPORT_SYMBOL_GPL(queue_delayed_work); | |||
268 | * queue_delayed_work_on - queue work on specific CPU after delay | 268 | * queue_delayed_work_on - queue work on specific CPU after delay |
269 | * @cpu: CPU number to execute work on | 269 | * @cpu: CPU number to execute work on |
270 | * @wq: workqueue to use | 270 | * @wq: workqueue to use |
271 | * @work: work to queue | 271 | * @dwork: work to queue |
272 | * @delay: number of jiffies to wait before queueing | 272 | * @delay: number of jiffies to wait before queueing |
273 | * | 273 | * |
274 | * Returns 0 if @work was already on a queue, non-zero otherwise. | 274 | * Returns 0 if @work was already on a queue, non-zero otherwise. |
@@ -637,9 +637,11 @@ int schedule_on_each_cpu(work_func_t func) | |||
637 | 637 | ||
638 | mutex_lock(&workqueue_mutex); | 638 | mutex_lock(&workqueue_mutex); |
639 | for_each_online_cpu(cpu) { | 639 | for_each_online_cpu(cpu) { |
640 | INIT_WORK(per_cpu_ptr(works, cpu), func); | 640 | struct work_struct *work = per_cpu_ptr(works, cpu); |
641 | __queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), | 641 | |
642 | per_cpu_ptr(works, cpu)); | 642 | INIT_WORK(work, func); |
643 | set_bit(WORK_STRUCT_PENDING, work_data_bits(work)); | ||
644 | __queue_work(per_cpu_ptr(keventd_wq->cpu_wq, cpu), work); | ||
643 | } | 645 | } |
644 | mutex_unlock(&workqueue_mutex); | 646 | mutex_unlock(&workqueue_mutex); |
645 | flush_workqueue(keventd_wq); | 647 | flush_workqueue(keventd_wq); |