From d5ed68ea91e3f6a6b366cc2dcf2b1e7b9ce2b8d0 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 28 Mar 2007 09:33:43 +0200 Subject: [PATCH] Fix infinite loop in get_next_file_rr() We need to clear f to NULL before doing a continue on FIO_FILE_DONE. Signed-off-by: Jens Axboe --- io_u.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index 5f51a00e..691f7afe 100644 --- a/io_u.c +++ b/io_u.c @@ -446,8 +446,10 @@ static struct fio_file *get_next_file_rr(struct thread_data *td, int goodf, if (td->next_file >= td->o.nr_files) td->next_file = 0; - if (f->flags & FIO_FILE_DONE) + if (f->flags & FIO_FILE_DONE) { + f = NULL; continue; + } if ((!goodf || (f->flags & goodf)) && !(f->flags & badf)) break; -- 2.25.1