workqueue: Factor out work_grab_pending() from __cancel_work_sync()
authorTejun Heo <tj@kernel.org>
Wed, 21 Feb 2024 05:36:14 +0000 (19:36 -1000)
committerTejun Heo <tj@kernel.org>
Wed, 21 Feb 2024 05:36:14 +0000 (19:36 -1000)
commit978b8409eab15aa733ae3a79c9b5158d34cd3fb7
tree38d3e2c556a2a7188f9f8fa228532dda0f954b88
parente9a8e01f9b133c145dd125021ec47c006d108af4
workqueue: Factor out work_grab_pending() from __cancel_work_sync()

The planned disable/enable support will need the same logic. Let's factor it
out. No functional changes.

v2: Update function comment to include @irq_flags.

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