Fix off-by-one in last_block()
authorJens Axboe <jens.axboe@oracle.com>
Thu, 15 May 2008 07:20:08 +0000 (09:20 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 15 May 2008 07:20:08 +0000 (09:20 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c

diff --git a/io_u.c b/io_u.c
index 0ba484169d31d024a041ddfc43b3baedc4b0f193..ec348781672bee90513b100485773c3bd83b85bf 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -83,7 +83,7 @@ static inline unsigned long long last_block(struct thread_data *td,
        if (!max_blocks)
                return 0;
 
-       return max_blocks - 1;
+       return max_blocks;
 }
 
 /*