X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=filesetup.c;h=93cddb1f467b3aea77cfc3b858c1164e89da8964;hb=f9c843e87dc804530780f40714d70eadadb239e4;hp=faeefaf308fa3e32107375fed6ac68faf65fe594;hpb=660a1cb5fb9843ec09a04337714e78d63cd557e7;p=fio.git diff --git a/filesetup.c b/filesetup.c index faeefaf3..93cddb1f 100644 --- a/filesetup.c +++ b/filesetup.c @@ -474,8 +474,7 @@ void close_files(struct thread_data *td) unsigned int i; for_each_file(td, f, i) { - if ((f->flags & FIO_FILE_UNLINK) && - f->filetype == FIO_TYPE_FILE) + if (td->o.unlink && f->filetype == FIO_TYPE_FILE) unlink(f->file_name); td_io_close_file(td, f); @@ -548,6 +547,7 @@ void add_file(struct thread_data *td, const char *fname) void get_file(struct fio_file *f) { + assert(f->flags & FIO_FILE_OPEN); f->references++; }