engines/aio-ring: initialization error handling
authorJens Axboe <axboe@kernel.dk>
Wed, 19 Dec 2018 19:55:10 +0000 (12:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Dec 2018 19:55:10 +0000 (12:55 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/aioring.c

index f4973dea70557fc9486f9f6c6f2969d404fd8a2d..59551f9cbfc557f4c20a4aa4a999989cfafb9d46 100644 (file)
@@ -515,13 +515,15 @@ static int fio_aioring_post_init(struct thread_data *td)
        }
 
        err = fio_aioring_queue_init(td);
+
+       /* Adjust depth back again */
+       td->o.iodepth--;
+
        if (err) {
-               td_verror(td, -err, "io_queue_init");
+               td_verror(td, errno, "io_queue_init");
                return 1;
        }
 
-       /* Adjust depth back again */
-       td->o.iodepth--;
        return 0;
 }