diff options
author | Al Viro | 2013-07-13 11:26:37 +0200 |
---|---|---|
committer | Al Viro | 2013-07-13 11:26:37 +0200 |
commit | bb458c644a59dbba3a1fe59b27106c5e68e1c4bd (patch) | |
tree | b0f3b51fc5cbd044b076cb0a1fec43ca62f2b7f5 /fs/namei.c | |
parent | ncpfs: fix error return code in ncp_parse_options() (diff) | |
download | kernel-qcow2-linux-bb458c644a59dbba3a1fe59b27106c5e68e1c4bd.tar.gz kernel-qcow2-linux-bb458c644a59dbba3a1fe59b27106c5e68e1c4bd.tar.xz kernel-qcow2-linux-bb458c644a59dbba3a1fe59b27106c5e68e1c4bd.zip |
Safer ABI for O_TMPFILE
[suggested by Rasmus Villemoes] make O_DIRECTORY | O_RDWR part of O_TMPFILE;
that will fail on old kernels in a lot more cases than what I came up with.
And make sure O_CREAT doesn't get there...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index b2beee7a733f..8b61d103a8a7 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2977,7 +2977,7 @@ static struct file *path_openat(int dfd, struct filename *pathname, file->f_flags = op->open_flag; - if (unlikely(file->f_flags & O_TMPFILE)) { + if (unlikely(file->f_flags & __O_TMPFILE)) { error = do_tmpfile(dfd, pathname, nd, flags, op, file, &opened); goto out; } |