Commit b8f06b04 authored by Lai Jiangshan's avatar Lai Jiangshan Committed by Tejun Heo

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: default avatarLai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 4f3f4cf3
...@@ -4403,13 +4403,11 @@ void destroy_workqueue(struct workqueue_struct *wq) ...@@ -4403,13 +4403,11 @@ void destroy_workqueue(struct workqueue_struct *wq)
raw_spin_unlock_irq(&pwq->pool->lock); raw_spin_unlock_irq(&pwq->pool->lock);
} }
mutex_unlock(&wq->mutex); mutex_unlock(&wq->mutex);
mutex_unlock(&wq_pool_mutex);
/* /*
* wq list is used to freeze wq, remove from list after * wq list is used to freeze wq, remove from list after
* flushing is complete in case freeze races us. * flushing is complete in case freeze races us.
*/ */
mutex_lock(&wq_pool_mutex);
list_del_rcu(&wq->list); list_del_rcu(&wq->list);
mutex_unlock(&wq_pool_mutex); mutex_unlock(&wq_pool_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment