diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-01-20 12:24:55 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-15 22:03:24 +0200 |
commit | af58dc1f50c1946018773beca23ebaad587b9cc9 (patch) | |
tree | e866e2877ac2cc0e24ec54bbf0899dd6f2185ded /fs/open.c | |
parent | get_file_rcu(): no need to check for NULL separately (diff) | |
download | linux-af58dc1f50c1946018773beca23ebaad587b9cc9.tar.xz linux-af58dc1f50c1946018773beca23ebaad587b9cc9.zip |
kernel_file_open(): get rid of inode argument
always equal to ->dentry->d_inode of the path argument these
days.
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c index ee8460c83c77..ec287ac67e7f 100644 --- a/fs/open.c +++ b/fs/open.c @@ -1155,7 +1155,6 @@ EXPORT_SYMBOL(dentry_create); * kernel_file_open - open a file for kernel internal use * @path: path of the file to open * @flags: open flags - * @inode: the inode * @cred: credentials for open * * Open a file for use by in-kernel consumers. The file is not accounted @@ -1165,7 +1164,7 @@ EXPORT_SYMBOL(dentry_create); * Return: Opened file on success, an error pointer on failure. */ struct file *kernel_file_open(const struct path *path, int flags, - struct inode *inode, const struct cred *cred) + const struct cred *cred) { struct file *f; int error; @@ -1175,7 +1174,7 @@ struct file *kernel_file_open(const struct path *path, int flags, return f; f->f_path = *path; - error = do_dentry_open(f, inode, NULL); + error = do_dentry_open(f, d_inode(path->dentry), NULL); if (error) { fput(f); f = ERR_PTR(error); |