aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/sync.c')
-rw-r--r--fs/sync.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/sync.c b/fs/sync.c
index a16d53e5fe9d..7abc65fbf21d 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -25,7 +25,7 @@ static void do_sync(unsigned long wait)
25{ 25{
26 wakeup_pdflush(0); 26 wakeup_pdflush(0);
27 sync_inodes(0); /* All mappings, inodes and their blockdevs */ 27 sync_inodes(0); /* All mappings, inodes and their blockdevs */
28 DQUOT_SYNC(NULL); 28 vfs_dq_sync(NULL);
29 sync_supers(); /* Write the superblocks */ 29 sync_supers(); /* Write the superblocks */
30 sync_filesystems(0); /* Start syncing the filesystems */ 30 sync_filesystems(0); /* Start syncing the filesystems */
31 sync_filesystems(wait); /* Waitingly sync the filesystems */ 31 sync_filesystems(wait); /* Waitingly sync the filesystems */
@@ -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/*