diff --git a/fs/btrfs/async-thread.c b/fs/btrfs/async-thread.c index e1e49715459ee9d45617bf67879afe5317257050..4229450b75963c8e6311a76f4b29dd52669836de 100644 --- a/fs/btrfs/async-thread.c +++ b/fs/btrfs/async-thread.c @@ -171,7 +171,8 @@ static int worker_loop(void *arg) } else { set_current_state(TASK_INTERRUPTIBLE); spin_unlock_irq(&worker->lock); - schedule(); + if (!kthread_should_stop()) + schedule(); __set_current_state(TASK_RUNNING); } } while (!kthread_should_stop());