diff options
author | Al Viro | 2018-07-11 15:00:04 -0400 |
---|---|---|
committer | Al Viro | 2018-07-12 10:04:13 -0400 |
commit | ea73ea7279884ba80896d4ea0f0443bf48b9e311 (patch) | |
tree | 4fd72a8f638d6c502ccb595e179a453819e18ded /fs/namei.c | |
parent | 6de37b6dc085e7c5e092b69289af66876526da44 (diff) |
pass ->f_flags value to alloc_empty_file()
... and have it set the f_flags-derived part of ->f_mode.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index af2ec1803f57..223925e30adb 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3513,12 +3513,10 @@ static struct file *path_openat(struct nameidata *nd, int opened = 0; int error; - file = alloc_empty_file(current_cred()); + file = alloc_empty_file(op->open_flag, current_cred()); if (IS_ERR(file)) return file; - file->f_flags = op->open_flag; - if (unlikely(file->f_flags & __O_TMPFILE)) { error = do_tmpfile(nd, flags, op, file, &opened); goto out2; |