workqueue: Replace pwq_activate_inactive_work() with [__]pwq_activate_work()
authorTejun Heo <tj@kernel.org>
Mon, 29 Jan 2024 18:11:24 +0000 (08:11 -1000)
committerTejun Heo <tj@kernel.org>
Mon, 29 Jan 2024 18:11:24 +0000 (08:11 -1000)
commit4c6380305d21e36581b451f7337a36c93b64e050
tree31d1673840553311e4069a428804d99faba578c5
parentafa87ce85379e2d93863fce595afdb5771a84004
workqueue: Replace pwq_activate_inactive_work() with [__]pwq_activate_work()

To prepare for unbound nr_active handling improvements, move work activation
part of pwq_activate_inactive_work() into __pwq_activate_work() and add
pwq_activate_work() which tests WORK_STRUCT_INACTIVE and updates nr_active.

pwq_activate_first_inactive() and try_to_grab_pending() are updated to use
pwq_activate_work(). The latter conversion is functionally identical. For
the former, this conversion adds an unnecessary WORK_STRUCT_INACTIVE
testing. This is temporary and will be removed by the next patch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
kernel/workqueue.c