Skip to content

Commit 47dd5be

Browse files
oleg-nesterovhtejun
authored andcommitted
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: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
1 parent 66f41d4 commit 47dd5be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/workqueue.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ void flush_delayed_work(struct delayed_work *dwork)
774774
{
775775
if (del_timer_sync(&dwork->timer)) {
776776
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());
778778
__queue_work(cwq, &dwork->work);
779779
put_cpu();
780780
}

0 commit comments

Comments
 (0)