summaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 11:42:26 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-14 11:42:26 -0700
commit41d9884c44237cd66e2bdbc412028b29196b344c (patch)
tree7a386f6de2f07c01f87f3a16965c9bb8b40f63c1 /fs/open.c
parent63345b4794aef4ebe16502cfe35b02bc9822d763 (diff)
parentdae3794fd603b92dcbac2859fe0bc7fe129a5188 (diff)
downloadlinux-41d9884c44237cd66e2bdbc412028b29196b344c.tar.bz2
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs stuff from Al Viro: "O_TMPFILE ABI changes, Oleg's fput() series, misc cleanups, including making simple_lookup() usable for filesystems with non-NULL s_d_op, which allows us to get rid of quite a bit of ugliness" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: sunrpc: now we can just set ->s_d_op cgroup: we can use simple_lookup() now efivarfs: we can use simple_lookup() now make simple_lookup() usable for filesystems that set ->s_d_op configfs: don't open-code d_alloc_name() __rpc_lookup_create_exclusive: pass string instead of qstr rpc_create_*_dir: don't bother with qstr llist: llist_add() can use llist_add_batch() llist: fix/simplify llist_add() and llist_add_batch() fput: turn "list_head delayed_fput_list" into llist_head fs/file_table.c:fput(): add comment Safer ABI for O_TMPFILE
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/open.c b/fs/open.c
index fca72c4d3f17..9156cb050d08 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -840,8 +840,8 @@ static inline int build_open_flags(int flags, umode_t mode, struct open_flags *o
if (flags & __O_SYNC)
flags |= O_DSYNC;
- if (flags & O_TMPFILE) {
- if (!(flags & O_CREAT))
+ if (flags & __O_TMPFILE) {
+ if ((flags & O_TMPFILE_MASK) != O_TMPFILE)
return -EINVAL;
acc_mode = MAY_OPEN | ACC_MODE(flags);
} else if (flags & O_PATH) {