aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2005-01-14 23:26:28 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-14 23:26:28 -0800
commitf9adcf4ea1599e61743bccc5cabf35501e5ee51d (patch)
tree4cf5db11ac0a3edc94c35258d06eff91247334fc /fs
parent1bed67e3cbd9fa5d4bf3f3dda9dfb105e2bcea87 (diff)
downloadhistory-f9adcf4ea1599e61743bccc5cabf35501e5ee51d.tar.gz
[PATCH] swsusp: refrigerator cleanups
This patch is from Nigel's swsusp2, it kills ugly #include <suspend.h> from all over the tree, and makes code slightly nicer. I only left those parts that do not change any code. From: Nigel Cunningham <ncunningham@linuxmail.org> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/background.c7
-rw-r--r--fs/reiserfs/journal.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c5
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c4
4 files changed, 3 insertions, 14 deletions
diff --git a/fs/jffs2/background.c b/fs/jffs2/background.c
index f342ec9c12d345..1be6de27dd8114 100644
--- a/fs/jffs2/background.c
+++ b/fs/jffs2/background.c
@@ -15,7 +15,6 @@
#include <linux/jffs2.h>
#include <linux/mtd/mtd.h>
#include <linux/completion.h>
-#include <linux/suspend.h>
#include "nodelist.h"
@@ -93,12 +92,8 @@ static int jffs2_garbage_collect_thread(void *_c)
schedule();
}
- if (current->flags & PF_FREEZE) {
- refrigerator(0);
- /* refrigerator() should recalc sigpending for us
- but doesn't. No matter - allow_signal() will. */
+ if (try_to_freeze(0))
continue;
- }
cond_resched();
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 3ae84cc4a76199..856e5c4e9fa2fa 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -50,7 +50,6 @@
#include <linux/stat.h>
#include <linux/string.h>
#include <linux/smp_lock.h>
-#include <linux/suspend.h>
#include <linux/buffer_head.h>
#include <linux/workqueue.h>
#include <linux/writeback.h>
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 4f7b9d367b1666..d5e75e606d1a24 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -51,7 +51,6 @@
#include <linux/sysctl.h>
#include <linux/proc_fs.h>
#include <linux/workqueue.h>
-#include <linux/suspend.h>
#include <linux/percpu.h>
#include <linux/blkdev.h>
@@ -1685,9 +1684,7 @@ pagebuf_daemon(
INIT_LIST_HEAD(&tmp);
do {
- /* swsusp */
- if (current->flags & PF_FREEZE)
- refrigerator(PF_FREEZE);
+ try_to_freeze(PF_FREEZE);
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((xfs_buf_timer_centisecs * HZ) / 100);
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index d598cb29341ace..b96f6e2db2854e 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -71,7 +71,6 @@
#include <linux/namei.h>
#include <linux/init.h>
#include <linux/mount.h>
-#include <linux/suspend.h>
#include <linux/writeback.h>
STATIC struct quotactl_ops linvfs_qops;
@@ -489,8 +488,7 @@ xfssyncd(
set_current_state(TASK_INTERRUPTIBLE);
timeleft = schedule_timeout(timeleft);
/* swsusp */
- if (current->flags & PF_FREEZE)
- refrigerator(PF_FREEZE);
+ try_to_freeze(PF_FREEZE);
if (vfsp->vfs_flag & VFS_UMOUNT)
break;