[AIO] fix cancellation of aio_down() aio_down() can only be cancelled once. Clear the ki_cancel method when the cancellation is complete. Signed-off-by: Benjamin LaHaise diff -purN --exclude=description 50_aio_down_cancel/lib/semaphore-sleepers.c 51_aio_down_cancel_fix/lib/semaphore-sleepers.c --- 50_aio_down_cancel/lib/semaphore-sleepers.c 2005-08-08 17:15:39.000000000 -0400 +++ 51_aio_down_cancel_fix/lib/semaphore-sleepers.c 2005-08-12 12:44:31.000000000 -0400 @@ -130,6 +130,7 @@ static int cancel_aio_down(struct kiocb if (!list_empty(&iocb->ki_wait.task_list)) { /* Ensure aio_down_wait() can no longer be called. */ list_del_init(&iocb->ki_wait.task_list); + iocb->ki_cancel = NULL; fixup_down_trylock_locked(sem); event->res = is_sync_kiocb(iocb) ? -ERESTARTSYS : -EINTR; } else