aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/async-thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/async-thread.c')
-rw-r--r--fs/btrfs/async-thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c
index e1e49715459e..4229450b7596 100644
--- a/fs/btrfs/async-thread.c
+++ b/fs/btrfs/async-thread.c
@@ -171,7 +171,8 @@ static int worker_loop(void *arg)
171 } else { 171 } else {
172 set_current_state(TASK_INTERRUPTIBLE); 172 set_current_state(TASK_INTERRUPTIBLE);
173 spin_unlock_irq(&worker->lock); 173 spin_unlock_irq(&worker->lock);
174 schedule(); 174 if (!kthread_should_stop())
175 schedule();
175 __set_current_state(TASK_RUNNING); 176 __set_current_state(TASK_RUNNING);
176 } 177 }
177 } while (!kthread_should_stop()); 178 } while (!kthread_should_stop());