diff options
-rw-r--r-- | kernel/workqueue.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 91ce7a984c22..1801c37b28c4 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -611,9 +611,13 @@ static struct worker_pool *get_work_pool(struct work_struct *work) | |||
611 | */ | 611 | */ |
612 | static int get_work_pool_id(struct work_struct *work) | 612 | static int get_work_pool_id(struct work_struct *work) |
613 | { | 613 | { |
614 | struct worker_pool *pool = get_work_pool(work); | 614 | unsigned long data = atomic_long_read(&work->data); |
615 | |||
616 | if (data & WORK_STRUCT_CWQ) | ||
617 | return ((struct cpu_workqueue_struct *) | ||
618 | (data & WORK_STRUCT_WQ_DATA_MASK))->pool->id; | ||
615 | 619 | ||
616 | return pool ? pool->id : WORK_OFFQ_POOL_NONE; | 620 | return data >> WORK_OFFQ_POOL_SHIFT; |
617 | } | 621 | } |
618 | 622 | ||
619 | static void mark_work_canceling(struct work_struct *work) | 623 | static void mark_work_canceling(struct work_struct *work) |