io_u: don't attempt to requeue for full residual
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 5289b5d1d9c6aa18ccd54f01748f95e9f14a4991..586a4befdce0969e596f9243abc73044b4b75fda 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -2004,7 +2004,7 @@ static void io_completed(struct thread_data *td, struct io_u **io_u_ptr,
                 * Make sure we notice short IO from here, and requeue them
                 * appropriately!
                 */
-               if (io_u->resid) {
+               if (bytes && io_u->resid) {
                        io_u->xfer_buflen = io_u->resid;
                        io_u->xfer_buf += bytes;
                        io_u->offset += bytes;