void unlock_file_all(struct thread_data *td, struct fio_file *f)
{
- if (td->o.file_lock_mode == FILE_LOCK_NONE)
+ if (td->o.file_lock_mode == FILE_LOCK_NONE || !td->file_locks)
return;
if (td->file_locks[f->fileno] != FILE_LOCK_NONE)
unlock_file(td, f);