aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/workqueue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 87693b37d017..63885abf1ba0 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -308,14 +308,14 @@ static int worker_thread(void *__cwq)
308 do_sigaction(SIGCHLD, &sa, (struct k_sigaction *)0); 308 do_sigaction(SIGCHLD, &sa, (struct k_sigaction *)0);
309 309
310 for (;;) { 310 for (;;) {
311 if (cwq->wq->freezeable)
312 try_to_freeze();
313
314 prepare_to_wait(&cwq->more_work, &wait, TASK_INTERRUPTIBLE); 311 prepare_to_wait(&cwq->more_work, &wait, TASK_INTERRUPTIBLE);
315 if (!cwq->should_stop && list_empty(&cwq->worklist)) 312 if (!freezing(current) && !cwq->should_stop
313 && list_empty(&cwq->worklist))
316 schedule(); 314 schedule();
317 finish_wait(&cwq->more_work, &wait); 315 finish_wait(&cwq->more_work, &wait);
318 316
317 try_to_freeze();
318
319 if (cwq_should_stop(cwq)) 319 if (cwq_should_stop(cwq))
320 break; 320 break;
321 321