diff options
author | Nathan Scott <nathans@sgi.com> | 2005-05-05 16:30:13 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@melbourne.sgi.com> | 2005-05-05 16:30:13 -0400 |
commit | abd0cf7aeaaf8a15d9777e65606b6076868b6186 (patch) | |
tree | 6ee2f3ee4fb4bcb6f922b80e03f69488254a469e /fs/xfs/linux-2.6/xfs_buf.c | |
parent | 764433b7f1cf5d7b5e27ceb4f5546042e1f4acc7 (diff) |
[XFS] Resolve an issue with xfsbufd not getting along with swsusp.
SGI Modid: xfs-linux:xfs-kern:22342a
Signed-off-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-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); |