summaryrefslogtreecommitdiffstats
path: root/fs/sync.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-03-17 09:38:40 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-03-26 11:01:36 +0100
commita2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4 (patch)
tree798376ab3cb0fdbea5fc067562e2adfabdb4d9d6 /fs/sync.c
parent6933c02e9cc47c2df3c016621a013ec79fb4203f (diff)
downloadlinux-a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4.tar.gz
linux-a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4.tar.bz2
linux-a2a9537ac0b37a5da6fbe7e1e9cb06c524d2a9c4.zip
Get rid of pdflush_operation() in emergency sync and remount
Opencode a cheasy approach with kevent. The idea here is that we'll add some generic delayed work infrastructure, which probably wont be based on pdflush (or maybe it will, in which case we can just add it back). This is in preparation for getting rid of pdflush completely. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
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)
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);
+ }
}
/*