Enfore that lockfile= must precede filename=
[fio.git] / filesetup.c
index bae60929df32f7f80f1dfa4ba00ab3ffbb9514b0..544ecb1c53dce5f336faf3294c0acfc75ace53e3 100644 (file)
@@ -1266,7 +1266,7 @@ void unlock_file(struct thread_data *td, struct fio_file *f)
 
 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);