提交 6a092dfd 编写于 作者: L Lai Jiangshan 提交者: Tejun Heo

workqueue: simplify current_is_workqueue_rescuer()

We can test worker->recue_wq instead of reaching into
current_pwq->wq->rescuer and then comparing it to self.

tj: Commit message.
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 12ee4fc6
......@@ -3936,7 +3936,7 @@ bool current_is_workqueue_rescuer(void)
{
struct worker *worker = current_wq_worker();
return worker && worker == worker->current_pwq->wq->rescuer;
return worker && worker->rescue_wq;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册