Clear f on error get_next_file_rr()
authorJens Axboe <jens.axboe@oracle.com>
Wed, 20 May 2009 08:45:12 +0000 (10:45 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 20 May 2009 08:45:12 +0000 (10:45 +0200)
Otherwise we could return an invalid non-open file and trigger and
assertion failure later in the process.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
io_u.c

diff --git a/io_u.c b/io_u.c
index fc49bd3..1e9018c 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -686,6 +686,7 @@ static struct fio_file *get_next_file_rr(struct thread_data *td, int goodf,
                        if (err) {
                                dprint(FD_FILE, "error %d on open of %s\n",
                                        err, f->file_name);
+                               f = NULL;
                                continue;
                        }
                        opened = 1;