projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix crash with file locking and dup'ed files
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index d67f1124618744db85595c2f037ffe07f9788794..d1702e29c75bf1b1f73dd0d2dc3ade1ac35f9e12 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-1343,6
+1343,11
@@
void dup_files(struct thread_data *td, struct thread_data *org)
__f->filetype = f->filetype;
}
+ if (td->o.file_lock_mode == FILE_LOCK_EXCLUSIVE)
+ __f->lock = f->lock;
+ else if (td->o.file_lock_mode == FILE_LOCK_READWRITE)
+ __f->rwlock = f->rwlock;
+
td->files[i] = __f;
}
}