Update rbtree code
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index 0580f42650e428b02f48752079d346afb8bfdb6c..2e0f8e9c601a16f8320fef4780e0bd340a9a047e 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -310,7 +310,7 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
           !(td->io_issues[DDIR_WRITE] % td->o.fsync_blocks) &&
             td->io_issues[DDIR_WRITE] && should_fsync(td)) {
                io_u->ddir = DDIR_SYNC;
-               return 0;
+               goto out;
        }
 
        io_u->ddir = get_rw_ddir(td);
@@ -329,12 +329,13 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
        /*
         * mark entry before potentially trimming io_u
         */
-       if (!td->o.read_iolog && td_random(td) && !td->o.norandommap)
+       if (td_random(td) && !td->o.norandommap)
                mark_random_map(td, io_u);
 
        /*
         * If using a write iolog, store this entry.
         */
+out:
        if (td->o.write_iolog_file)
                write_iolog_put(td, io_u);