Commit abd0cf7a authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] Resolve an issue with xfsbufd not getting along with swsusp.

SGI Modid: xfs-linux:xfs-kern:22342a
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
Signed-off-by: default avatarChristoph Hellwig <hch@sgi.com>
parent 764433b7
...@@ -1746,13 +1746,15 @@ STATIC DECLARE_COMPLETION(pagebuf_daemon_done); ...@@ -1746,13 +1746,15 @@ STATIC DECLARE_COMPLETION(pagebuf_daemon_done);
STATIC struct task_struct *pagebuf_daemon_task; STATIC struct task_struct *pagebuf_daemon_task;
STATIC int pagebuf_daemon_active; STATIC int pagebuf_daemon_active;
STATIC int force_flush; STATIC int force_flush;
STATIC int force_sleep;
STATIC int STATIC int
pagebuf_daemon_wakeup( pagebuf_daemon_wakeup(
int priority, int priority,
unsigned int mask) unsigned int mask)
{ {
if (force_sleep)
return 0;
force_flush = 1; force_flush = 1;
barrier(); barrier();
wake_up_process(pagebuf_daemon_task); wake_up_process(pagebuf_daemon_task);
...@@ -1778,7 +1780,12 @@ pagebuf_daemon( ...@@ -1778,7 +1780,12 @@ pagebuf_daemon(
INIT_LIST_HEAD(&tmp); INIT_LIST_HEAD(&tmp);
do { 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); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100); schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment