History

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.

Lai Jiangshan committed 13 years ago

Commit 6a092df1 parent 12ee4fc1 file · +1 −1Browse files

Showing the changes to kernel/workqueue.c (1 of 1 file). Show all

Unified · Split

kernel/workqueue.c+1−1
@@ -3936,7 +3936,7 @@ bool current_is_workqueue_rescuer(void) · 3935 unmodified lines
39363936 {
39373937 struct worker *worker = current_wq_worker();
39383938
3939− return worker && worker == worker->current_pwq->wq->rescuer;
3939+ return worker && worker->rescue_wq;
39403940 }
39413941
39423942 /**