From 106b070c9dbffd7c632aa4f259376d6d13659e8c Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Tue, 19 Feb 2013 12:17:02 -0800 Subject: [PATCH] --- yaml --- r: 365476 b: refs/heads/master c: b31041042a8cdece67f925e4bae55b5f5fd754ca h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/workqueue.c | 3 ++- trunk/kernel/workqueue_internal.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 9c9a760cc32e..e8d3571e3220 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f36dc67b27a689eeb3631b11ebef17bbff257fbb +refs/heads/master: b31041042a8cdece67f925e4bae55b5f5fd754ca diff --git a/trunk/kernel/workqueue.c b/trunk/kernel/workqueue.c index 09545d445a55..fd9a28a13afd 100644 --- a/trunk/kernel/workqueue.c +++ b/trunk/kernel/workqueue.c @@ -2357,8 +2357,8 @@ static int rescuer_thread(void *__rescuer) mayday_clear_cpu(cpu, wq->mayday_mask); /* migrate to the target cpu if possible */ - rescuer->pool = pool; worker_maybe_bind_and_lock(pool); + rescuer->pool = pool; /* * Slurp in all works issued via this workqueue and @@ -2379,6 +2379,7 @@ static int rescuer_thread(void *__rescuer) if (keep_working(pool)) wake_up_worker(pool); + rescuer->pool = NULL; spin_unlock_irq(&pool->lock); } diff --git a/trunk/kernel/workqueue_internal.h b/trunk/kernel/workqueue_internal.h index 07650264ec15..f9c887731e2b 100644 --- a/trunk/kernel/workqueue_internal.h +++ b/trunk/kernel/workqueue_internal.h @@ -32,6 +32,7 @@ struct worker { struct list_head scheduled; /* L: scheduled works */ struct task_struct *task; /* I: worker task */ struct worker_pool *pool; /* I: the associated pool */ + /* L: for rescuers */ /* 64 bytes boundary on 64bit, 32 on 32bit */ unsigned long last_active; /* L: last active timestamp */ unsigned int flags; /* X: flags */