Add the file sharing bits
[fio.git] / ioengines.c
index 5a2d6b90fb0c6d73d45d0b6c5ce5307f505691d2..bd2eb4a71ed899f2b7d3857d97ce87312b05aa2e 100644 (file)
@@ -359,5 +359,10 @@ int td_io_close_file(struct thread_data *td, struct fio_file *f)
         */
        f->flags |= FIO_FILE_CLOSING;
 
+       if (f->sem_owner == td && f->sem_batch) {
+               f->sem_batch = 0;
+               unlock_file(f);
+       }
+
        return put_file(td, f);
 }