diff options
Diffstat (limited to 'kernel/power/main.c')
-rw-r--r-- | kernel/power/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index fb2412e7a0ce..3cdf95b1dc92 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/resume-trace.h> | 20 | #include <linux/resume-trace.h> |
21 | #include <linux/freezer.h> | 21 | #include <linux/freezer.h> |
22 | #include <linux/vmstat.h> | 22 | #include <linux/vmstat.h> |
23 | #include <linux/syscalls.h> | ||
23 | 24 | ||
24 | #include "power.h" | 25 | #include "power.h" |
25 | 26 | ||
@@ -230,9 +231,14 @@ static int enter_state(suspend_state_t state) | |||
230 | 231 | ||
231 | if (!valid_state(state)) | 232 | if (!valid_state(state)) |
232 | return -ENODEV; | 233 | return -ENODEV; |
234 | |||
233 | if (!mutex_trylock(&pm_mutex)) | 235 | if (!mutex_trylock(&pm_mutex)) |
234 | return -EBUSY; | 236 | return -EBUSY; |
235 | 237 | ||
238 | printk("Syncing filesystems ... "); | ||
239 | sys_sync(); | ||
240 | printk("done.\n"); | ||
241 | |||
236 | pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]); | 242 | pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]); |
237 | if ((error = suspend_prepare())) | 243 | if ((error = suspend_prepare())) |
238 | goto Unlock; | 244 | goto Unlock; |