From ba929e7fa5581d040e416e75a5918a2c72570903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=E9bastien=20Dugu?= Date: Tue, 28 Jun 2005 20:44:59 -0700 Subject: [PATCH] --- yaml --- r: 3887 b: refs/heads/master c: c016e2257acd00a7ffd87fa1eec896138563d1aa h: refs/heads/master i: 3885: e7c865e2c9be72f67e1b29c6a1166d579e2126f8 3883: d9ee6839ae8d992a82e5a58ff87c5d765c006b4d 3879: 40f974e09aedca8b77eb29bb9aef9ac0fdd09729 3871: 8fb640659cfdd4c23f252918c6a02b46c6614f5a v: v3 --- [refs] | 2 +- trunk/fs/aio.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 77a2c45c357c..7fc5b7f91fc8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 334a13ec3d01a1a4b4f2249735b793105cb4a519 +refs/heads/master: c016e2257acd00a7ffd87fa1eec896138563d1aa diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 7afa222f6802..06d7d4390fe7 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -58,6 +58,7 @@ static DEFINE_SPINLOCK(fput_lock); static LIST_HEAD(fput_head); static void aio_kick_handler(void *); +static void aio_queue_work(struct kioctx *); /* aio_setup * Creates the slab caches used by the aio routines, panic on @@ -747,6 +748,14 @@ static ssize_t aio_run_iocb(struct kiocb *iocb) * has already been kicked */ if (kiocbIsKicked(iocb)) { __queue_kicked_iocb(iocb); + + /* + * __queue_kicked_iocb will always return 1 here, because + * iocb->ki_run_list is empty at this point so it should + * be safe to unconditionally queue the context into the + * work queue. + */ + aio_queue_work(ctx); } } return ret;