don't duplicate vfs_open() in kernel_file_open()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/20250615003216.GB3011112@ZenIV
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Al Viro 2025-06-15 01:32:16 +01:00 committed by Christian Brauner
parent d209f6e122
commit 88b1de5497
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2
1 changed files with 1 additions and 4 deletions

View File

@ -1204,14 +1204,11 @@ struct file *kernel_file_open(const struct path *path, int flags,
if (IS_ERR(f)) if (IS_ERR(f))
return f; return f;
f->f_path = *path; error = vfs_open(path, f);
error = do_dentry_open(f, NULL);
if (error) { if (error) {
fput(f); fput(f);
return ERR_PTR(error); return ERR_PTR(error);
} }
fsnotify_open(f);
return f; return f;
} }
EXPORT_SYMBOL_GPL(kernel_file_open); EXPORT_SYMBOL_GPL(kernel_file_open);