mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[O_TMPFILE] it's still short a few helpers, but infrastructure should be OK now...
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
f9652e10c1
commit
60545d0d46
12 changed files with 164 additions and 5 deletions
14
fs/open.c
14
fs/open.c
|
|
@ -840,11 +840,15 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
|
|||
if (flags & __O_SYNC)
|
||||
flags |= O_DSYNC;
|
||||
|
||||
/*
|
||||
* If we have O_PATH in the open flag. Then we
|
||||
* cannot have anything other than the below set of flags
|
||||
*/
|
||||
if (flags & O_PATH) {
|
||||
if (flags & O_TMPFILE) {
|
||||
if (!(flags & O_CREAT))
|
||||
return -EINVAL;
|
||||
acc_mode = MAY_OPEN | ACC_MODE(flags);
|
||||
} else if (flags & O_PATH) {
|
||||
/*
|
||||
* If we have O_PATH in the open flag. Then we
|
||||
* cannot have anything other than the below set of flags
|
||||
*/
|
||||
flags &= O_DIRECTORY | O_NOFOLLOW | O_PATH;
|
||||
acc_mode = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue