Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
ba57ea64
Commit
ba57ea64
authored
Jul 20, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow O_TMPFILE to work with O_WRONLY
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
c0d15cc7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
fs/open.c
fs/open.c
+2
-0
include/uapi/asm-generic/fcntl.h
include/uapi/asm-generic/fcntl.h
+2
-2
No files found.
fs/open.c
View file @
ba57ea64
...
@@ -844,6 +844,8 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
...
@@ -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
)
if
((
flags
&
O_TMPFILE_MASK
)
!=
O_TMPFILE
)
return
-
EINVAL
;
return
-
EINVAL
;
acc_mode
=
MAY_OPEN
|
ACC_MODE
(
flags
);
acc_mode
=
MAY_OPEN
|
ACC_MODE
(
flags
);
if
(
!
(
acc_mode
&
MAY_WRITE
))
return
-
EINVAL
;
}
else
if
(
flags
&
O_PATH
)
{
}
else
if
(
flags
&
O_PATH
)
{
/*
/*
* If we have O_PATH in the open flag. Then we
* If we have O_PATH in the open flag. Then we
...
...
include/uapi/asm-generic/fcntl.h
View file @
ba57ea64
...
@@ -89,8 +89,8 @@
...
@@ -89,8 +89,8 @@
#endif
#endif
/* a horrid kludge trying to make sure that this will fail on old kernels */
/* a horrid kludge trying to make sure that this will fail on old kernels */
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY
| O_RDWR
)
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT
| O_ACCMODE
)
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
#ifndef O_NDELAY
#ifndef O_NDELAY
#define O_NDELAY O_NONBLOCK
#define O_NDELAY O_NONBLOCK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment