X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=filesetup.c;h=a2427a1a80bb0bea52aeee2cab761faac09a5cef;hb=c7b42e0a8c3d6fb179cc7c681fcee58623de8b2f;hp=75694bd81825082516d9f1601de08a650ebe9aa1;hpb=c479640d6208236744f0562b1e79535eec290e2b;p=fio.git 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); }