提交 519e3c11 编写于 作者: L Lai Jiangshan 提交者: Tejun Heo

workqueue: avoid false negative in assert_manager_or_pool_lock()

If lockdep complains something for other subsystem, lockdep_is_held()
can be false negative, so we need to also test debug_locks before
triggering WARN.
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 88109453
......@@ -305,7 +305,8 @@ static void copy_workqueue_attrs(struct workqueue_attrs *to,
#ifdef CONFIG_LOCKDEP
#define assert_manager_or_pool_lock(pool) \
WARN_ONCE(!lockdep_is_held(&(pool)->manager_mutex) && \
WARN_ONCE(debug_locks && \
!lockdep_is_held(&(pool)->manager_mutex) && \
!lockdep_is_held(&(pool)->lock), \
"pool->manager_mutex or ->lock should be held")
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册