ioengines: don't call munmap unless size boundary is exceeded
[fio.git] / engines / mmap.c
index 51606e12ff316c3ff537ec328103b17e4c3b1ba0..77556588e1a21218ead2006d5d73ee1bd41087c5 100644 (file)
@@ -137,7 +137,7 @@ static int fio_mmapio_prep(struct thread_data *td, struct io_u *io_u)
         * It fits within existing mapping, use it
         */
        if (io_u->offset >= fmd->mmap_off &&
-           io_u->offset + io_u->buflen < fmd->mmap_off + fmd->mmap_sz)
+           io_u->offset + io_u->buflen <= fmd->mmap_off + fmd->mmap_sz)
                goto done;
 
        /*