btrfs: Use schedule_timeout_interruptible
[sfrench/cifs-2.6.git] / fs / btrfs / disk-io.c
index b23961a4af520050f196e4b42c228289a4832992..fa80de56340fbd24b8769386fdeaa65eae4190c6 100644 (file)
@@ -1800,12 +1800,10 @@ sleep:
                if (unlikely(test_bit(BTRFS_FS_STATE_ERROR,
                                      &fs_info->fs_state)))
                        btrfs_cleanup_transaction(fs_info);
-               set_current_state(TASK_INTERRUPTIBLE);
                if (!kthread_should_stop() &&
                                (!btrfs_transaction_blocked(fs_info) ||
                                 cannot_commit))
-                       schedule_timeout(delay);
-               __set_current_state(TASK_RUNNING);
+                       schedule_timeout_interruptible(delay);
        } while (!kthread_should_stop());
        return 0;
 }