diff options
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 23e0eb67fc25..997963e53622 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -1746,13 +1746,15 @@ STATIC DECLARE_COMPLETION(pagebuf_daemon_done); | |||
1746 | STATIC struct task_struct *pagebuf_daemon_task; | 1746 | STATIC struct task_struct *pagebuf_daemon_task; |
1747 | STATIC int pagebuf_daemon_active; | 1747 | STATIC int pagebuf_daemon_active; |
1748 | STATIC int force_flush; | 1748 | STATIC int force_flush; |
1749 | 1749 | STATIC int force_sleep; | |
1750 | 1750 | ||
1751 | STATIC int | 1751 | STATIC int |
1752 | pagebuf_daemon_wakeup( | 1752 | pagebuf_daemon_wakeup( |
1753 | int priority, | 1753 | int priority, |
1754 | unsigned int mask) | 1754 | unsigned int mask) |
1755 | { | 1755 | { |
1756 | if (force_sleep) | ||
1757 | return 0; | ||
1756 | force_flush = 1; | 1758 | force_flush = 1; |
1757 | barrier(); | 1759 | barrier(); |
1758 | wake_up_process(pagebuf_daemon_task); | 1760 | wake_up_process(pagebuf_daemon_task); |
@@ -1778,7 +1780,12 @@ pagebuf_daemon( | |||
1778 | 1780 | ||
1779 | INIT_LIST_HEAD(&tmp); | 1781 | INIT_LIST_HEAD(&tmp); |
1780 | do { | 1782 | do { |
1781 | try_to_freeze(PF_FREEZE); | 1783 | if (unlikely(current->flags & PF_FREEZE)) { |
1784 | force_sleep = 1; | ||
1785 | refrigerator(PF_FREEZE); | ||
1786 | } else { | ||
1787 | force_sleep = 0; | ||
1788 | } | ||
1782 | 1789 | ||
1783 | set_current_state(TASK_INTERRUPTIBLE); | 1790 | set_current_state(TASK_INTERRUPTIBLE); |
1784 | schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100); | 1791 | schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100); |