X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=filesetup.c;h=a2427a1a80bb0bea52aeee2cab761faac09a5cef;hp=75694bd81825082516d9f1601de08a650ebe9aa1;hb=11ff4c37e3fc4fa4eb03c55942b89f92eb01263f;hpb=196ccc44e70333cc87f9d417967bd06288602dac diff --git a/filesetup.c b/filesetup.c index 75694bd8..a2427a1a 100644 --- a/filesetup.c +++ b/filesetup.c @@ -674,7 +674,8 @@ open_again: from_hash = file_lookup_open(f, flags); } else if (td_trim(td)) { assert(!td_rw(td)); /* should have matched above */ - flags |= O_RDWR; + if (!read_only) + flags |= O_RDWR; from_hash = file_lookup_open(f, flags); }