freezer: unexport refrigerator() and update try_to_freeze() slightly
[deliverable/linux.git] / fs / btrfs / disk-io.c
index 62afe5c5694e9f4681931daee508334835bad243..622654fe051f9c90e4ac6074f7fdff68a2c5896e 100644 (file)
@@ -1579,9 +1579,7 @@ static int cleaner_kthread(void *arg)
                        btrfs_run_defrag_inodes(root->fs_info);
                }
 
-               if (freezing(current)) {
-                       refrigerator();
-               } else {
+               if (!try_to_freeze()) {
                        set_current_state(TASK_INTERRUPTIBLE);
                        if (!kthread_should_stop())
                                schedule();
@@ -1635,9 +1633,7 @@ sleep:
                wake_up_process(root->fs_info->cleaner_kthread);
                mutex_unlock(&root->fs_info->transaction_kthread_mutex);
 
-               if (freezing(current)) {
-                       refrigerator();
-               } else {
+               if (!try_to_freeze()) {
                        set_current_state(TASK_INTERRUPTIBLE);
                        if (!kthread_should_stop() &&
                            !btrfs_transaction_blocked(root->fs_info))
This page took 0.024509 seconds and 5 git commands to generate.