Skip to content

Commit

Permalink
workqueue: simplify current_is_workqueue_rescuer()
Browse files Browse the repository at this point in the history
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 <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Lai Jiangshan authored and Tejun Heo committed Mar 20, 2013
1 parent 12ee4fc commit 6a092df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/workqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit 6a092df

Please sign in to comment.