engines/cpu: Fix td_vmsg() call
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 155d0a3288acb0703e74c824f34ad9ce515d3900..00a219c2e85922906dd859583ef6f1ae31ad29c0 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -795,7 +795,7 @@ void put_io_u(struct thread_data *td, struct io_u *io_u)
 {
        const bool needs_lock = td_async_processing(td);
 
-       zbd_put_io_u(io_u);
+       zbd_put_io_u(td, io_u);
 
        if (td->parent)
                td = td->parent;
@@ -1326,8 +1326,10 @@ static struct fio_file *__get_next_file(struct thread_data *td)
        if (f && fio_file_open(f) && !fio_file_closing(f)) {
                if (td->o.file_service_type == FIO_FSERVICE_SEQ)
                        goto out;
-               if (td->file_service_left--)
-                       goto out;
+               if (td->file_service_left) {
+                 td->file_service_left--;
+                 goto out;
+               }
        }
 
        if (td->o.file_service_type == FIO_FSERVICE_RR ||
@@ -1369,7 +1371,7 @@ static long set_io_u_file(struct thread_data *td, struct io_u *io_u)
                if (!fill_io_u(td, io_u))
                        break;
 
-               zbd_put_io_u(io_u);
+               zbd_put_io_u(td, io_u);
 
                put_file_log(td, f);
                td_io_close_file(td, f);