From: Jens Axboe Date: Wed, 28 Mar 2007 07:33:43 +0000 (+0200) Subject: Fix infinite loop in get_next_file_rr() X-Git-Tag: fio-1.15~6 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=d5ed68ea91e3f6a6b366cc2dcf2b1e7b9ce2b8d0 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 --- 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;