aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sync.c')
-rw-r--r--fs/sync.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/sync.c b/fs/sync.c
index a16d53e5fe9d..ec95a69d17aa 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -42,9 +42,21 @@ SYSCALL_DEFINE0(sync)
42 return 0; 42 return 0;
43} 43}
44 44
45static void do_sync_work(struct work_struct *work)
46{
47 do_sync(0);
48 kfree(work);
49}
50
45void emergency_sync(void) 51void emergency_sync(void)
46{ 52{
47 pdflush_operation(do_sync, 0); 53 struct work_struct *work;
54
55 work = kmalloc(sizeof(*work), GFP_ATOMIC);
56 if (work) {
57 INIT_WORK(work, do_sync_work);
58 schedule_work(work);
59 }
48} 60}
49 61
50/* 62/*