flush_delayed_work() always uses keventd_wq for re-queueing, but it should use the workqueue this dwork was queued on.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork) · 773 unmodified lines | |||
| 774 | { | 774 | { |
| 775 | if (del_timer_sync(&dwork->timer)) { | 775 | if (del_timer_sync(&dwork->timer)) { |
| 776 | struct cpu_workqueue_struct *cwq; | 776 | struct cpu_workqueue_struct *cwq; |
| 777 | cwq = wq_per_cpu(keventd_wq, get_cpu()); | 777 | cwq = wq_per_cpu(get_wq_data(&dwork->work)->wq, get_cpu()); |
| 778 | __queue_work(cwq, &dwork->work); | 778 | __queue_work(cwq, &dwork->work); |
| 779 | put_cpu(); | 779 | put_cpu(); |
| 780 | } | 780 | } |