diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2007-10-18 12:04:44 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 23:37:18 +0200 |
commit | 232b14328050a4639130b0dec185f43968e72035 (patch) | |
tree | eb3b525278bd3efd5403bc4f5cfb3e41614d40c4 /kernel/power/user.c | |
parent | freezer: document relationship with memory shrinking (diff) | |
download | linux-232b14328050a4639130b0dec185f43968e72035.tar.xz linux-232b14328050a4639130b0dec185f43968e72035.zip |
freezer: do not sync filesystems from freeze_processes
The syncing of filesystems from within the freezer is generally not needed.
Also, if there's an ext3 filesystem loopback-mounted from a FUSE one, the
syncing results in writes to it and deadlocks. Similarly, it will deadlock if
FUSE implements sync.
Change freeze_processes() so that it doesn't execute sys_sync() and make the
suspend and hibernation code path sync filesystems independently of the
freezer.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@nigel.suspend2.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r-- | kernel/power/user.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index bd0723a7df3f..5bd321bcbb75 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -153,6 +153,10 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp, mutex_lock(&pm_mutex); error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); if (!error) { + printk("Syncing filesystems ... "); + sys_sync(); + printk("done.\n"); + error = freeze_processes(); if (error) thaw_processes(); |