From ee5e08ad08efd44cb62ea37bf865c2848a47b581 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 15 Nov 2018 18:56:12 -0700 Subject: [PATCH] io_u: fall through to unlock path in case of error 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 --- io_u.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/io_u.c b/io_u.c index d28d368f..1604ff84 100644 --- 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); - if (td->error) - return NULL; - goto again; + if (!td->error) + goto again; } if (needs_lock) -- 2.25.1