The error path will close the file.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
+ fio_file_reset(f);
+ f->flags |= FIO_FILE_OPEN;
+ f->flags &= ~FIO_FILE_CLOSING;
+
+ td->nr_open_files++;
+ get_file(f);
+
if (f->filetype == FIO_TYPE_PIPE) {
if (td_random(td)) {
log_err("fio: can't seek on pipes (no random io)\n");
if (f->filetype == FIO_TYPE_PIPE) {
if (td_random(td)) {
log_err("fio: can't seek on pipes (no random io)\n");
- fio_file_reset(f);
- f->flags |= FIO_FILE_OPEN;
- f->flags &= ~FIO_FILE_CLOSING;
-
if (td->io_ops->flags & FIO_DISKLESSIO)
goto done;
if (td->io_ops->flags & FIO_DISKLESSIO)
goto done;
done:
log_file(td, f, FIO_LOG_OPEN_FILE);
done:
log_file(td, f, FIO_LOG_OPEN_FILE);
- td->nr_open_files++;
- get_file(f);
return 0;
err:
if (td->io_ops->close_file)
return 0;
err:
if (td->io_ops->close_file)