sync iocb wakeup
PATCH 1/1 sync iocb wakeup
In aio_complete, sync iocbs aren't being woken up if iocb->ki_users == 1. The following patch should fix this.
(Ben, let me know if I'm missing anything here)
fs/aio.c +6 -6
@@ -642,13 +717,13 @@ iocb->ki_user_data = res;if (iocb->ki_users ==1 ) { iocb->ki_users =0 ; -return 1 ; + ret =1 ; + }else { +spin_lock_irq (&ctx->ctx_lock); + iocb->ki_users--; + ret = (0 == iocb->ki_users); +spin_unlock_irq (&ctx->ctx_lock); } -spin_lock_irq (&ctx->ctx_lock); - iocb->ki_users--; - ret = (0 == iocb->ki_users); -spin_unlock_irq (&ctx->ctx_lock); -/* sync iocbs put the task here for us */ wake_up_process (iocb->ki_user_obj);return ret;
Signature · 3 lines
Suparna Bhattacharya ([email protected]) Linux Technology Center IBM Software Labs, India