|
@@ -1032,7 +1032,10 @@ static void __queue_work(unsigned int cpu, struct workqueue_struct *wq,
|
|
|
cwq = get_cwq(gcwq->cpu, wq);
|
|
|
trace_workqueue_queue_work(cpu, cwq, work);
|
|
|
|
|
|
- BUG_ON(!list_empty(&work->entry));
|
|
|
+ if (WARN_ON(!list_empty(&work->entry))) {
|
|
|
+ spin_unlock_irqrestore(&gcwq->lock, flags);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
cwq->nr_in_flight[cwq->work_color]++;
|
|
|
work_flags = work_color_to_flags(cwq->work_color);
|