posixaio: fix thread problem with using errno

If we fail queueing a read or a write, use aio_error() to
retrieve the right error value. This fixes an issue on
(at least) Solaris where we get EAGAIN due to system
shortage of resources, but treat that as a random type
of error due to using errno.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 file changed