commit | c97d8369f04e562383f50a77a2b0e2abb102df75 | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Mon May 21 14:52:43 2007 +0200 |
committer | Jens Axboe <jens.axboe@oracle.com> | Mon May 21 14:52:43 2007 +0200 |
tree | f4ea916e1ef0473e85c32963fb68f101e80bce32 | |
parent | 2bfe24bdd9ce313e5323d947952067b1475dd2cc [diff] [blame] |
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)) {