From: Jens Axboe Date: Wed, 10 Jun 2009 07:05:13 +0000 (+0200) Subject: File close fixes X-Git-Tag: fio-1.27.4~2 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=2be3eec330360e6735fb4e7d70907e11eaa346f8;hp=39d9ef6a390466ccf58b8579ed2da508456594d0 File close fixes Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index 17bdd263..a0a4b80d 100644 --- a/filesetup.c +++ b/filesetup.c @@ -710,8 +710,10 @@ void close_files(struct thread_data *td) struct fio_file *f; unsigned int i; - for_each_file(td, f, i) - td_io_close_file(td, f); + for_each_file(td, f, i) { + if (fio_file_open(f)) + td_io_close_file(td, f); + } } void close_and_free_files(struct thread_data *td) diff --git a/fio.c b/fio.c index 61aabb30..632b0025 100644 --- a/fio.c +++ b/fio.c @@ -1374,8 +1374,6 @@ static void run_threads(void) for_each_file(td, f, i) { if (fio_file_open(f)) td_io_close_file(td, f); - else - assert(f->fd == -1); } }