PM / sleep: Refactor filesystems sync to reduce duplication
[sfrench/cifs-2.6.git] / kernel / power / main.c
index 98e76cad128b81c37a8a8f9592884fd9daf95c56..40472a7c55366903ab66ce4142f979cfd0f55290 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/debugfs.h>
 #include <linux/seq_file.h>
 #include <linux/suspend.h>
+#include <linux/syscalls.h>
 
 #include "power.h"
 
@@ -51,6 +52,14 @@ void unlock_system_sleep(void)
 }
 EXPORT_SYMBOL_GPL(unlock_system_sleep);
 
+void ksys_sync_helper(void)
+{
+       pr_info("Syncing filesystems ... ");
+       ksys_sync();
+       pr_cont("done.\n");
+}
+EXPORT_SYMBOL_GPL(ksys_sync_helper);
+
 /* Routines for PM-transition notifications */
 
 static BLOCKING_NOTIFIER_HEAD(pm_chain_head);