diff options
author | James Morris <jmorris@namei.org> | 2009-03-28 04:57:13 +0100 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-03-28 04:57:13 +0100 |
commit | bb798169d1bb860b07192cf9c75937fadc8610b4 (patch) | |
tree | fa67f14406a1e79897e6f29e59fed7c02ec31c30 /fs/sync.c | |
parent | TOMOYO: Fix a typo. (diff) | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-bb798169d1bb860b07192cf9c75937fadc8610b4.tar.xz linux-bb798169d1bb860b07192cf9c75937fadc8610b4.zip |
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'fs/sync.c')
-rw-r--r-- | fs/sync.c | 16 |
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) { wakeup_pdflush(0); sync_inodes(0); /* All mappings, inodes and their blockdevs */ - DQUOT_SYNC(NULL); + vfs_dq_sync(NULL); sync_supers(); /* Write the superblocks */ sync_filesystems(0); /* Start syncing the filesystems */ sync_filesystems(wait); /* Waitingly sync the filesystems */ @@ -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); + } } /* |