summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-03-11 17:22:19 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2021-01-03 21:06:02 -0500
commit1e8f44f159b31fe31ad2f40f96575b6ad6df2fe9 (patch)
tree6e71e32c9506881072e5d67b708188c1c222576d /fs
parent5c8fe583cce542aa0b84adc939ce85293de36e5e (diff)
downloadlinux-1e8f44f159b31fe31ad2f40f96575b6ad6df2fe9.tar.gz
linux-1e8f44f159b31fe31ad2f40f96575b6ad6df2fe9.tar.bz2
linux-1e8f44f159b31fe31ad2f40f96575b6ad6df2fe9.zip
do_tmpfile(): don't mess with finish_open()
use vfs_open() instead Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 78443a85480a..a3b3ca62ef5c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -3325,10 +3325,8 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
audit_inode(nd->name, child, 0);
/* Don't check for other permissions, the inode was just created */
error = may_open(&path, 0, op->open_flag);
- if (error)
- goto out2;
- file->f_path.mnt = path.mnt;
- error = finish_open(file, child, NULL);
+ if (!error)
+ error = vfs_open(&path, file);
out2:
mnt_drop_write(path.mnt);
out: