diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 800b4208dba9a0..e51ab3d4765ebd 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -2569,6 +2569,7 @@ __acquires(&pool->lock) */ set_work_pool_and_clear_pending(work, pool->id); + pwq->stats[PWQ_STAT_STARTED]++; raw_spin_unlock_irq(&pool->lock); lock_map_acquire(&pwq->wq->lockdep_map); @@ -2595,7 +2596,6 @@ __acquires(&pool->lock) * workqueues), so hiding them isn't a problem. */ lockdep_invariant_state(true); - pwq->stats[PWQ_STAT_STARTED]++; trace_workqueue_execute_start(work); worker->current_func(work); /*