diff options
-rw-r--r-- | fs/super.c | 11 | ||||
-rw-r--r-- | fs/sync.c | 14 |
2 files changed, 22 insertions, 3 deletions
diff --git a/fs/super.c b/fs/super.c index 6ce501447ada..dd4acb158b5e 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -674,7 +674,7 @@ int do_remount_sb(struct super_block *sb, int flags, void *data, int force) | |||
674 | return 0; | 674 | return 0; |
675 | } | 675 | } |
676 | 676 | ||
677 | static void do_emergency_remount(unsigned long foo) | 677 | static void do_emergency_remount(struct work_struct *work) |
678 | { | 678 | { |
679 | struct super_block *sb; | 679 | struct super_block *sb; |
680 | 680 | ||
@@ -697,12 +697,19 @@ static void do_emergency_remount(unsigned long foo) | |||
697 | spin_lock(&sb_lock); | 697 | spin_lock(&sb_lock); |
698 | } | 698 | } |
699 | spin_unlock(&sb_lock); | 699 | spin_unlock(&sb_lock); |
700 | kfree(work); | ||
700 | printk("Emergency Remount complete\n"); | 701 | printk("Emergency Remount complete\n"); |
701 | } | 702 | } |
702 | 703 | ||
703 | void emergency_remount(void) | 704 | void emergency_remount(void) |
704 | { | 705 | { |
705 | pdflush_operation(do_emergency_remount, 0); | 706 | struct work_struct *work; |
707 | |||
708 | work = kmalloc(sizeof(*work), GFP_ATOMIC); | ||
709 | if (work) { | ||
710 | INIT_WORK(work, do_emergency_remount); | ||
711 | schedule_work(work); | ||
712 | } | ||
706 | } | 713 | } |
707 | 714 | ||
708 | /* | 715 | /* |
@@ -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 | /* |