backend: do_dry_run(): get_io_u() can return an error pointer
authorJens Axboe <axboe@fb.com>
Fri, 29 Jul 2016 15:59:38 +0000 (09:59 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 29 Jul 2016 15:59:38 +0000 (09:59 -0600)
Don't just check for NULL.

Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c

index 2f290d2d7d1358429c1a66440f79de648bfd88c9..8a71490e9a59424e6e243afc1f1eb8356443b3e2 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1399,7 +1399,7 @@ static uint64_t do_dry_run(struct thread_data *td)
                        break;
 
                io_u = get_io_u(td);
-               if (!io_u)
+               if (IS_ERR_OR_NULL(io_u))
                        break;
 
                io_u_set(io_u, IO_U_F_FLIGHT);