diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2013-07-20 03:11:32 +0400 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-02 15:51:38 +0200 |
| commit | 78b1eb1bc375a51902a6b1114f1b6a05edd49b6c (patch) | |
| tree | 5e4f0391df4e49323bbbaab0ccd2c3ba6b73d301 /fs | |
| parent | 4580b5fb67ef2544f0bc391418f762dc62086306 (diff) | |
allow O_TMPFILE to work with O_WRONLY
Change-Id: I90171d1b53a4c35bfa76757ecfdfb6f95330d107
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/open.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -847,6 +847,8 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o if ((flags & O_TMPFILE_MASK) != O_TMPFILE) return -EINVAL; acc_mode = MAY_OPEN | ACC_MODE(flags); + if (!(acc_mode & MAY_WRITE)) + return -EINVAL; } else if (flags & O_PATH) { /* * If we have O_PATH in the open flag. Then we |
