X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=fs%2Faio.c;h=06d7d4390fe7dd8562e8433ce3a29b2b9ee4e241;hb=75e8727fbb3749075b6df36be636a3045ed9d515;hp=7afa222f68028a338eae68907ae231a446cc398c;hpb=325a479c4c110db278ef3361460a48c4093252cc;p=~andy%2Flinux diff --git a/fs/aio.c b/fs/aio.c index 7afa222f680..06d7d4390fe 100644 --- a/fs/aio.c +++ b/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 @@ out: * 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;