[PATCH] aio-retry-fix: fix aio retry work queueing

In the case of buffered AIO, in the aio retry path (aio_run_iocb), when the
retry method returns EIOCBRETRY the kicked iocb is added to the context run
list but is never queued onto the work queue. The request therefore is
never completed.

This patch fixes that by adding the appropriate call to aio_queue_work in
aio_run_aiocb so that subsequent retries will be handled by the aio worker
thread.

Signed-off-by: S�bastien Dugu� <sebastien.dugue@bull.net>
Acked-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by S�bastien Dugu and committed by Linus Torvalds c016e225 334a13ec

+9
+9
fs/aio.c
··· 58 58 static LIST_HEAD(fput_head); 59 59 60 60 static void aio_kick_handler(void *); 61 + static void aio_queue_work(struct kioctx *); 61 62 62 63 /* aio_setup 63 64 * Creates the slab caches used by the aio routines, panic on ··· 748 747 * has already been kicked */ 749 748 if (kiocbIsKicked(iocb)) { 750 749 __queue_kicked_iocb(iocb); 750 + 751 + /* 752 + * __queue_kicked_iocb will always return 1 here, because 753 + * iocb->ki_run_list is empty at this point so it should 754 + * be safe to unconditionally queue the context into the 755 + * work queue. 756 + */ 757 + aio_queue_work(ctx); 751 758 } 752 759 } 753 760 return ret;