diff --git a/[refs] b/[refs] index c1a5e0e6baa3..727f2d4fdd62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dccae99995089641fbac452ebc7f0cab18751ddb +refs/heads/master: b5555f77115bfba3630fefff2d4e68140b644171 diff --git a/trunk/fs/btrfs/async-thread.c b/trunk/fs/btrfs/async-thread.c index c84ca1f5259a..cba701dba350 100644 --- a/trunk/fs/btrfs/async-thread.c +++ b/trunk/fs/btrfs/async-thread.c @@ -195,6 +195,9 @@ static int worker_loop(void *arg) if (!list_empty(&worker->pending)) continue; + if (kthread_should_stop()) + break; + /* still no more work?, sleep for real */ spin_lock_irq(&worker->lock); set_current_state(TASK_INTERRUPTIBLE); @@ -208,7 +211,8 @@ static int worker_loop(void *arg) worker->working = 0; spin_unlock_irq(&worker->lock); - schedule(); + if (!kthread_should_stop()) + schedule(); } __set_current_state(TASK_RUNNING); }