mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 14:14:37 +00:00
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 <laijs@linux.alibaba.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
4f3f4cf388
commit
b8f06b0444
1 changed files with 0 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue