diff options
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -42,9 +42,21 @@ SYSCALL_DEFINE0(sync) | |||
42 | return 0; | 42 | return 0; |
43 | } | 43 | } |
44 | 44 | ||
45 | static void do_sync_work(struct work_struct *work) | ||
46 | { | ||
47 | do_sync(0); | ||
48 | kfree(work); | ||
49 | } | ||
50 | |||
45 | void emergency_sync(void) | 51 | void 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 | /* |