diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 79fcec674485..bc32ed4a4cf3 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1379,7 +1379,6 @@ static void __queue_work(int cpu, struct workqueue_struct *wq, */ WARN_ON_ONCE(!irqs_disabled()); - debug_work_activate(work); /* if draining, only works from the same workqueue are allowed */ if (unlikely(wq->flags & __WQ_DRAINING) && @@ -1462,6 +1461,7 @@ retry: worklist = &pwq->delayed_works; } + debug_work_activate(work); insert_work(pwq, work, worklist, work_flags); spin_unlock(&pwq->pool->lock);