From: Jens Axboe Date: Thu, 17 Jun 2021 16:55:20 +0000 (-0600) Subject: filehash: ignore hashed file with fd == -1 X-Git-Tag: fio-3.28~51 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=afa37b56c6637967180e4409adbb682b2ce16bcb;p=fio.git filehash: ignore hashed file with fd == -1 This can happen sporadically during setup, and it need not be a failure condition. Signed-off-by: Jens Axboe --- diff --git a/filehash.c b/filehash.c index b55ab734..71ec7b18 100644 --- a/filehash.c +++ b/filehash.c @@ -60,10 +60,8 @@ static struct fio_file *__lookup_file_hash(const char *name) if (!f->file_name) continue; - if (!strcmp(f->file_name, name)) { - assert(f->fd != -1); + if (!strcmp(f->file_name, name)) return f; - } } return NULL;