Silly though it is, completions and wait_queue_heads use foo_ONSTACK (COMPLETION_INITIALIZER_ONSTACK, DECLARE_COMPLETION_ONSTACK, __WAIT_QUEUE_HEAD_INIT_ONSTACK and DECLARE_WAIT_QUEUE_HEAD_ONSTACK) so I guess workqueues should do the same thing. s/INIT_WORK_ON_STACK/INIT_WORK_ONSTACK/ s/INIT_DELAYED_WORK_ON_STACK/INIT_DELAYED_WORK_ONSTACK/
Showing the changes to kernel/workqueue.c (1 of 5 files). Show all
Unified · Split
| @@ -2064,7 +2064,7 @@ static void insert_wq_barrier(struct cpu_workqueue_struct *cwq, · 2063 unmodified lines | ||
| 2064 | 2064 | * checks and call back into the fixup functions where we |
| 2065 | 2065 | * might deadlock. |
| 2066 | 2066 | */ |
| 2067 | − INIT_WORK_ON_STACK(&barr->work, wq_barrier_func); | |
| 2067 | + INIT_WORK_ONSTACK(&barr->work, wq_barrier_func); | |
| 2068 | 2068 | __set_bit(WORK_STRUCT_PENDING_BIT, work_data_bits(&barr->work)); |
| 2069 | 2069 | init_completion(&barr->done); |
| 2070 | 2070 | |