aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-07-19 19:11:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-07-19 19:11:32 -0400
commitba57ea64cb1820deb37637de0fdb107f0dc90089 (patch)
treedd8d302d4f16107e87b555aca3630ada6fcd472a /fs
parentc0d15cc7ee8c0d1970197d9eb1727503bcdd2471 (diff)
allow O_TMPFILE to work with O_WRONLY
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/open.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/open.c b/fs/open.c
index 9156cb050d08..d53e29895082 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -844,6 +844,8 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
844 if ((flags & O_TMPFILE_MASK) != O_TMPFILE) 844 if ((flags & O_TMPFILE_MASK) != O_TMPFILE)
845 return -EINVAL; 845 return -EINVAL;
846 acc_mode = MAY_OPEN | ACC_MODE(flags); 846 acc_mode = MAY_OPEN | ACC_MODE(flags);
847 if (!(acc_mode & MAY_WRITE))
848 return -EINVAL;
847 } else if (flags & O_PATH) { 849 } else if (flags & O_PATH) {
848 /* 850 /*
849 * If we have O_PATH in the open flag. Then we 851 * If we have O_PATH in the open flag. Then we