filehash: ignore hashed file with fd == -1
authorJens Axboe <axboe@kernel.dk>
Thu, 17 Jun 2021 16:55:20 +0000 (10:55 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Jun 2021 16:55:20 +0000 (10:55 -0600)
This can happen sporadically during setup, and it need not be a
failure condition.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
filehash.c

index b55ab7340e68065de4bcb6eb6e8f39111d38886e..71ec7b18c3345cfabdd2a7f48c0ce20c1c2579d3 100644 (file)
@@ -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;