projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed4aa70
)
Only set O_RDWR for open() when readonly isn't set
author
Jens Axboe
<jens.axboe@oracle.com>
Fri, 7 Mar 2008 12:42:31 +0000
(13:42 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 7 Mar 2008 12:42:31 +0000
(13:42 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 37a34399e03d29d75d432b9c7c2ef62afcb96a07..5c02f1c46408fb0e2f781f1ba15118e710935a4e 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-291,9
+291,8
@@
int generic_open_file(struct thread_data *td, struct fio_file *f)
open_again:
if (td_write(td)) {
- assert(!read_only);
-
- flags |= O_RDWR;
+ if (!read_only)
+ flags |= O_RDWR;
if (f->filetype == FIO_TYPE_FILE)
flags |= O_CREAT;