diff options
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r-- | kernel/workqueue.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 4fcb75b98443..fe08a8512ddd 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -159,14 +159,11 @@ static void __queue_work(struct cpu_workqueue_struct *cwq, | |||
159 | */ | 159 | */ |
160 | int queue_work(struct workqueue_struct *wq, struct work_struct *work) | 160 | int queue_work(struct workqueue_struct *wq, struct work_struct *work) |
161 | { | 161 | { |
162 | int ret = 0; | 162 | int ret; |
163 | |||
164 | ret = queue_work_on(get_cpu(), wq, work); | ||
165 | put_cpu(); | ||
163 | 166 | ||
164 | if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) { | ||
165 | BUG_ON(!list_empty(&work->entry)); | ||
166 | __queue_work(wq_per_cpu(wq, get_cpu()), work); | ||
167 | put_cpu(); | ||
168 | ret = 1; | ||
169 | } | ||
170 | return ret; | 167 | return ret; |
171 | } | 168 | } |
172 | EXPORT_SYMBOL_GPL(queue_work); | 169 | EXPORT_SYMBOL_GPL(queue_work); |