[AIO] fix io_wait When an application is mixing sync and async IO it ends up crashing later on in the sync path when calling lock_page_slow as the io_wait queue has been set to NULL in a previous AIO request. Therefore after the retry method has been called the task io_wait queue should be reset to the default queue. This patch applies over Suparna's wait-bit patchset: - modify-wait-bit-action-args - lock_page_wait - init-wait-bit-key - tsk-default-io-wait - aio-wait-bit - aio-wait-page and could be folded into aio-wait-bit. Signed-off-by: Sébastien Dugué Signed-off-by: Benjamin LaHaise diff -purN --exclude=description 78_fs_aio_write/fs/aio.c 79_fix-io_wait/fs/aio.c --- 78_fs_aio_write/fs/aio.c 2005-08-08 17:16:03.000000000 -0400 +++ 79_fix-io_wait/fs/aio.c 2005-08-08 17:16:06.000000000 -0400 @@ -733,7 +733,7 @@ static ssize_t aio_run_iocb(struct kiocb BUG_ON(!is_sync_wait(current->io_wait)); current->io_wait = &iocb->ki_wait.wait; ret = retry(iocb); - current->io_wait = NULL; + current->io_wait = ¤t->__wait.wait; if (-EIOCBRETRY != ret) { if (-EIOCBQUEUED != ret) {