Do proper wait for pending IO on clean exit

Only do the cancel if something went wrong and td->error is set,
otherwise be a good citizen and complete and account for the io
we submitted.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
1 file changed