summaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 0e5ec6e002b1..656715d216b4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3442,6 +3442,10 @@ static bool assign_rescuer_work(struct pool_workqueue *pwq, struct worker *rescu
struct worker_pool *pool = pwq->pool;
struct work_struct *work, *n;
+ /* need rescue? */
+ if (!pwq->nr_active || !need_to_create_worker(pool))
+ return false;
+
/*
* Slurp in all works issued via this workqueue and
* process'em.