mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
allow O_TMPFILE to work with O_WRONLY
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
c0d15cc7ee
commit
ba57ea64cb
2 changed files with 4 additions and 2 deletions
|
|
@ -844,6 +844,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
|
||||
|
|
|
|||
Loading…
Reference in a new issue