We can test worker->recue_wq instead of reaching into current_pwq->wq->rescuer and then comparing it to self. tj: Commit message.
Showing the changes to kernel/workqueue.c (1 of 1 file). Show all
Unified · Split
| @@ -3936,7 +3936,7 @@ bool current_is_workqueue_rescuer(void) · 3935 unmodified lines | |||
| 3936 | { | 3936 | { |
| 3937 | struct worker *worker = current_wq_worker(); | 3937 | struct worker *worker = current_wq_worker(); |
| 3938 | 3938 | ||
| 3939 | return worker && worker == worker->current_pwq->wq->rescuer; | 3939 | return worker && worker->rescue_wq; |
| 3940 | } | 3940 | } |
| 3941 | 3941 | ||
| 3942 | /** | 3942 | /** |