Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71107
b: refs/heads/master
c: 232b143
h: refs/heads/master
i:
  71105: c7bf90f
  71103: 6166835
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Oct 18, 2007
1 parent 9394b1d commit 26276d9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2776365370b579afc36cff14dc70a567b66f0378
refs/heads/master: 232b14328050a4639130b0dec185f43968e72035
4 changes: 4 additions & 0 deletions trunk/kernel/power/disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ int hibernate(void)
if (error)
goto Exit;

printk("Syncing filesystems ... ");
sys_sync();
printk("done.\n");

error = prepare_processes();
if (error)
goto Finish;
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/power/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/resume-trace.h>
#include <linux/freezer.h>
#include <linux/vmstat.h>
#include <linux/syscalls.h>

#include "power.h"

Expand Down Expand Up @@ -230,9 +231,14 @@ static int enter_state(suspend_state_t state)

if (!valid_state(state))
return -ENODEV;

if (!mutex_trylock(&pm_mutex))
return -EBUSY;

printk("Syncing filesystems ... ");
sys_sync();
printk("done.\n");

pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
if ((error = suspend_prepare()))
goto Unlock;
Expand Down
1 change: 0 additions & 1 deletion trunk/kernel/power/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ int freeze_processes(void)
if (error)
return error;

sys_sync();
error = try_to_freeze_tasks(FREEZER_KERNEL_THREADS);
if (error)
return error;
Expand Down
4 changes: 4 additions & 0 deletions trunk/kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 26276d9

Please sign in to comment.