X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=kernel%2Fworkqueue.c;h=398c34ff6a54a90eb82f90856a75a29dc210bc2d;hb=36aa9dfc39bf473780439f5629c30f59d677e793;hp=1d1933cf3778163ca4e54f1a7c32055920599d2d;hpb=d721304dce0ced0b3b0366996cc02929669708a8;p=powerpc.git diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 1d1933cf37..398c34ff6a 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -625,17 +625,12 @@ EXPORT_SYMBOL_GPL(__create_workqueue); static void cleanup_workqueue_thread(struct workqueue_struct *wq, int cpu) { - struct cpu_workqueue_struct *cwq; - unsigned long flags; - struct task_struct *p; + struct cpu_workqueue_struct *cwq = per_cpu_ptr(wq->cpu_wq, cpu); - cwq = per_cpu_ptr(wq->cpu_wq, cpu); - spin_lock_irqsave(&cwq->lock, flags); - p = cwq->thread; - cwq->thread = NULL; - spin_unlock_irqrestore(&cwq->lock, flags); - if (p) - kthread_stop(p); + if (cwq->thread) { + kthread_stop(cwq->thread); + cwq->thread = NULL; + } } /**