From: Nathan Scott Date: Thu, 5 May 2005 20:30:13 +0000 (-0700) Subject: [XFS] Resolve an issue with xfsbufd not getting along with swsusp. X-Git-Tag: v2.6.12-rc4~125 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd0cf7aeaaf8a15d9777e65606b6076868b6186;p=linux-2.6 [XFS] Resolve an issue with xfsbufd not getting along with swsusp. SGI Modid: xfs-linux:xfs-kern:22342a Signed-off-by: Nathan Scott Signed-off-by: Christoph Hellwig --- diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 23e0eb67fc..997963e536 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); STATIC struct task_struct *pagebuf_daemon_task; STATIC int pagebuf_daemon_active; STATIC int force_flush; - +STATIC int force_sleep; STATIC int pagebuf_daemon_wakeup( int priority, unsigned int mask) { + if (force_sleep) + return 0; force_flush = 1; barrier(); wake_up_process(pagebuf_daemon_task); @@ -1778,7 +1780,12 @@ pagebuf_daemon( INIT_LIST_HEAD(&tmp); do { - try_to_freeze(PF_FREEZE); + if (unlikely(current->flags & PF_FREEZE)) { + force_sleep = 1; + refrigerator(PF_FREEZE); + } else { + force_sleep = 0; + } set_current_state(TASK_INTERRUPTIBLE); schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100);