From: Lai Jiangshan Date: Tue, 19 Mar 2013 19:28:03 +0000 (+0800) Subject: workqueue: simplify current_is_workqueue_rescuer() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6a092dfd51e5af9b321d683d4b4eddc79e2606ed;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: Lai Jiangshan Signed-off-by: Tejun Heo --- diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 40f4017285a0..d2ac6cbfe8ab 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -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; } /**