The previous fix was too drastic, if we don't put the io_u on early
exit, cleanup_pending_aio() will stall forever waiting for it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
if (!io_u)
break;
- if (runtime_exceeded(td, &io_u->start_time))
+ if (runtime_exceeded(td, &io_u->start_time)) {
+ put_io_u(td, io_u);
break;
+ }
- if (get_next_verify(td, io_u))
+ if (get_next_verify(td, io_u)) {
+ put_io_u(td, io_u);
break;
+ }
- if (td_io_prep(td, io_u))
+ if (td_io_prep(td, io_u)) {
+ put_io_u(td, io_u);
break;
-
+ }
requeue:
ret = td_io_queue(td, io_u);