diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1d1933cf3778..398c34ff6a54 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -625,17 +625,12 @@ EXPORT_SYMBOL_GPL(__create_workqueue); | |||
625 | 625 | ||
626 | static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) | 626 | static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) |
627 | { | 627 | { |
628 | struct cpu_workqueue_struct *cwq; | 628 | struct cpu_workqueue_struct *cwq = per_cpu_ptr(wq->cpu_wq, cpu); |
629 | unsigned long flags; | ||
630 | struct task_struct *p; | ||
631 | 629 | ||
632 | cwq = per_cpu_ptr(wq->cpu_wq, cpu); | 630 | if (cwq->thread) { |
633 | spin_lock_irqsave(&cwq->lock, flags); | 631 | kthread_stop(cwq->thread); |
634 | p = cwq->thread; | 632 | cwq->thread = NULL; |
635 | cwq->thread = NULL; | 633 | } |
636 | spin_unlock_irqrestore(&cwq->lock, flags); | ||
637 | if (p) | ||
638 | kthread_stop(p); | ||
639 | } | 634 | } |
640 | 635 | ||
641 | /** | 636 | /** |