From: Lai Jiangshan Date: Fri, 29 May 2020 06:59:02 +0000 (+0000) Subject: workqueue: remove useless unlock() and lock() in series X-Git-Tag: v5.10.7~2421^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8f06b0444ec146e3ae98caac8039c77e5308ce2;p=platform%2Fkernel%2Flinux-rpi.git workqueue: remove useless unlock() and lock() in series This is no point to unlock() and then lock() the same mutex back to back. Signed-off-by: Lai Jiangshan Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 6feefc6..c667ca5ae 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -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);