]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/sync.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[linux-2.6-omap-h63xx.git] / fs / sync.c
index ef36bc921bf33a625391efc5a85be0e44f1b02f8..7abc65fbf21df8455400e9757751f8069cd29f28 100644 (file)
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -42,9 +42,21 @@ SYSCALL_DEFINE0(sync)
        return 0;
 }
 
+static void do_sync_work(struct work_struct *work)
+{
+       do_sync(0);
+       kfree(work);
+}
+
 void emergency_sync(void)
 {
-       pdflush_operation(do_sync, 0);
+       struct work_struct *work;
+
+       work = kmalloc(sizeof(*work), GFP_ATOMIC);
+       if (work) {
+               INIT_WORK(work, do_sync_work);
+               schedule_work(work);
+       }
 }
 
 /*