io_u: fall through to unlock path in case of error
authorJens Axboe <axboe@kernel.dk>
Fri, 16 Nov 2018 01:56:12 +0000 (18:56 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 16 Nov 2018 01:56:12 +0000 (18:56 -0700)
Doesn't really matter since we're exiting anyway, but let's
do this right.

Fixes: d28174f0189c ("workqueue: ensure we see deferred error for IOs")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_u.c

diff --git a/io_u.c b/io_u.c
index d28d368f694916683ad05ad34f7fa446d3c11e89..1604ff84b94edc14dea508589e683dfecdd95baa 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1559,9 +1559,8 @@ again:
                assert(!(td->flags & TD_F_CHILD));
                ret = pthread_cond_wait(&td->free_cond, &td->io_u_lock);
                assert(ret == 0);
                assert(!(td->flags & TD_F_CHILD));
                ret = pthread_cond_wait(&td->free_cond, &td->io_u_lock);
                assert(ret == 0);
-               if (td->error)
-                       return NULL;
-               goto again;
+               if (!td->error)
+                       goto again;
        }
 
        if (needs_lock)
        }
 
        if (needs_lock)