mmap engine: fix open-for-size check

Don't call into mmap() yet, since we didn't setup ->io_size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/engines/mmap.c b/engines/mmap.c
index 95ad1d8..f3d55c1 100644
--- a/engines/mmap.c
+++ b/engines/mmap.c
@@ -60,6 +60,12 @@
 	if (ret)
 		return ret;
 
+	/*
+	 * for size checkup, don't mmap anything.
+	 */
+	if (!f->io_size)
+		return 0;
+
 	if (td_rw(td))
 		flags = PROT_READ | PROT_WRITE;
 	else if (td_write(td)) {