Skip to content
Commit 38be7a79 authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix file mode calculation



open(2) must always include one of O_RDONLY, O_WRONLY, or O_RDWR.  No need
for any O_APPEND special case.

Passing O_WRONLY|O_RDWR is undefined according to the man page, but the
Linux VFS interprets this as O_RDWR, so we'll do the same.

This fixes open(2) with flags O_RDWR|O_APPEND, which was incorrectly being
translated to readonly.

Reported-by: default avatarFyodor Ustinov <ufm@ufm.su>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent d7f124f1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment