engines/libaio: fix submit loop to use 'ld->queued' for exit

We could have head == tail for a full ring, so use the
amount queued as the gauge instead. This would be very
hard to trigger, as it would require a full ring on entry
and the first submit would have to fail to submit anything
before we loop around.

Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/engines/libaio.c b/engines/libaio.c
index ca7bfde..6f62516 100644
--- a/engines/libaio.c
+++ b/engines/libaio.c
@@ -283,7 +283,7 @@
 			continue;
 		} else
 			break;
-	} while (ld->head != ld->tail);
+	} while (ld->queued);
 
 	return ret;
 }