Commit 1e8f44f1 authored by Al Viro's avatar Al Viro

do_tmpfile(): don't mess with finish_open()

use vfs_open() instead
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 5c8fe583
...@@ -3325,10 +3325,8 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags, ...@@ -3325,10 +3325,8 @@ static int do_tmpfile(struct nameidata *nd, unsigned flags,
audit_inode(nd->name, child, 0); audit_inode(nd->name, child, 0);
/* Don't check for other permissions, the inode was just created */ /* Don't check for other permissions, the inode was just created */
error = may_open(&path, 0, op->open_flag); error = may_open(&path, 0, op->open_flag);
if (error) if (!error)
goto out2; error = vfs_open(&path, file);
file->f_path.mnt = path.mnt;
error = finish_open(file, child, NULL);
out2: out2:
mnt_drop_write(path.mnt); mnt_drop_write(path.mnt);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment