Merge branch 'master' into gfio
[fio.git] / ioengines.c
index f4eae04db6df5d072103191f05b187fcb6f19e80..93e763124c1b18f56bdfc6eb54e912f0b0f11788 100644 (file)
@@ -475,7 +475,9 @@ int td_io_close_file(struct thread_data *td, struct fio_file *f)
        fio_file_set_closing(f);
 
        disk_util_dec(f->du);
-       unlock_file_all(td, f);
+
+       if (td->o.file_lock_mode != FILE_LOCK_NONE)
+               unlock_file_all(td, f);
 
        return put_file(td, f);
 }