Commit 47dd5be2 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Tejun Heo

workqueue: flush_delayed_work: keep the original workqueue for re-queueing

flush_delayed_work() always uses keventd_wq for re-queueing,
but it should use the workqueue this dwork was queued on.
Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 66f41d4c
...@@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork) ...@@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork)
{ {
if (del_timer_sync(&dwork->timer)) { if (del_timer_sync(&dwork->timer)) {
struct cpu_workqueue_struct *cwq; struct cpu_workqueue_struct *cwq;
cwq = wq_per_cpu(keventd_wq, get_cpu()); cwq = wq_per_cpu(get_wq_data(&dwork->work)->wq, get_cpu());
__queue_work(cwq, &dwork->work); __queue_work(cwq, &dwork->work);
put_cpu(); put_cpu();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment