mirror of https://github.com/torvalds/linux.git
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:
parent
d209f6e122
commit
88b1de5497
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue