|
@@ -25,7 +25,6 @@
|
|
#include <linux/buffer_head.h>
|
|
#include <linux/buffer_head.h>
|
|
#include <linux/workqueue.h>
|
|
#include <linux/workqueue.h>
|
|
#include <linux/kthread.h>
|
|
#include <linux/kthread.h>
|
|
-#include <linux/freezer.h>
|
|
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/migrate.h>
|
|
#include <linux/migrate.h>
|
|
#include <linux/ratelimit.h>
|
|
#include <linux/ratelimit.h>
|
|
@@ -1928,14 +1927,12 @@ sleep:
|
|
if (unlikely(test_bit(BTRFS_FS_STATE_ERROR,
|
|
if (unlikely(test_bit(BTRFS_FS_STATE_ERROR,
|
|
&root->fs_info->fs_state)))
|
|
&root->fs_info->fs_state)))
|
|
btrfs_cleanup_transaction(root);
|
|
btrfs_cleanup_transaction(root);
|
|
- if (!try_to_freeze()) {
|
|
|
|
- set_current_state(TASK_INTERRUPTIBLE);
|
|
|
|
- if (!kthread_should_stop() &&
|
|
|
|
- (!btrfs_transaction_blocked(root->fs_info) ||
|
|
|
|
- cannot_commit))
|
|
|
|
- schedule_timeout(delay);
|
|
|
|
- __set_current_state(TASK_RUNNING);
|
|
|
|
- }
|
|
|
|
|
|
+ set_current_state(TASK_INTERRUPTIBLE);
|
|
|
|
+ if (!kthread_should_stop() &&
|
|
|
|
+ (!btrfs_transaction_blocked(root->fs_info) ||
|
|
|
|
+ cannot_commit))
|
|
|
|
+ schedule_timeout(delay);
|
|
|
|
+ __set_current_state(TASK_RUNNING);
|
|
} while (!kthread_should_stop());
|
|
} while (!kthread_should_stop());
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|