]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/sync.c
Get rid of pdflush_operation() in emergency sync and remount
[karo-tx-linux.git] / fs / sync.c
index a16d53e5fe9d68a5a4f6b000fd1366e9fb91e167..ec95a69d17aa73e058bedd5c61e42d23f87a4f91 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);
+       }
 }
 
 /*