ret = wait_for_completion_interruptible(&data->done);
                if (!ret) {
                        mutex_lock(&ctx->uring_lock);
-                       if (atomic_read(&data->refs) > 0) {
-                               /*
-                                * it has been revived by another thread while
-                                * we were unlocked
-                                */
-                               mutex_unlock(&ctx->uring_lock);
-                       } else {
+                       if (atomic_read(&data->refs) <= 0)
                                break;
-                       }
+                       /*
+                        * it has been revived by another thread while
+                        * we were unlocked
+                        */
+                       mutex_unlock(&ctx->uring_lock);
                }
-
 reinit:
                atomic_inc(&data->refs);
                /* wait for all works potentially completing data->done */