]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
workqueue: remove useless unlock() and lock() in series
authorLai Jiangshan <laijs@linux.alibaba.com>
Fri, 29 May 2020 06:59:02 +0000 (06:59 +0000)
committerTejun Heo <tj@kernel.org>
Fri, 29 May 2020 14:25:23 +0000 (10:25 -0400)
This is no point to unlock() and then lock() the same mutex
back to back.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c

index 6feefc65d3324c6e704f4a84e4a72fcb2385b3cf..c667ca5aed61a724e2f429257b1497a8c6940763 100644 (file)
@@ -4403,13 +4403,11 @@ void destroy_workqueue(struct workqueue_struct *wq)
                raw_spin_unlock_irq(&pwq->pool->lock);
        }
        mutex_unlock(&wq->mutex);
-       mutex_unlock(&wq_pool_mutex);
 
        /*
         * wq list is used to freeze wq, remove from list after
         * flushing is complete in case freeze races us.
         */
-       mutex_lock(&wq_pool_mutex);
        list_del_rcu(&wq->list);
        mutex_unlock(&wq_pool_mutex);