diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/workqueue.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 41eaffd125ca..0611de815a8f 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -246,8 +246,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq) | |||
246 | spin_unlock_irq(&cwq->lock); | 246 | spin_unlock_irq(&cwq->lock); |
247 | 247 | ||
248 | BUG_ON(get_wq_data(work) != cwq); | 248 | BUG_ON(get_wq_data(work) != cwq); |
249 | if (!test_bit(WORK_STRUCT_NOAUTOREL, work_data_bits(work))) | 249 | work_clear_pending(work); |
250 | work_release(work); | ||
251 | f(work); | 250 | f(work); |
252 | 251 | ||
253 | if (unlikely(in_atomic() || lockdep_depth(current) > 0)) { | 252 | if (unlikely(in_atomic() || lockdep_depth(current) > 0)) { |
@@ -453,7 +452,7 @@ void flush_work(struct workqueue_struct *wq, struct work_struct *work) | |||
453 | */ | 452 | */ |
454 | spin_lock_irq(&cwq->lock); | 453 | spin_lock_irq(&cwq->lock); |
455 | list_del_init(&work->entry); | 454 | list_del_init(&work->entry); |
456 | work_release(work); | 455 | work_clear_pending(work); |
457 | spin_unlock_irq(&cwq->lock); | 456 | spin_unlock_irq(&cwq->lock); |
458 | 457 | ||
459 | for_each_cpu_mask(cpu, *cpu_map) | 458 | for_each_cpu_mask(cpu, *cpu_map) |