summaryrefslogtreecommitdiff
path: root/fs/open.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-01-20 14:24:55 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2024-04-15 23:03:24 +0300
commitaf58dc1f50c1946018773beca23ebaad587b9cc9 (patch)
treee866e2877ac2cc0e24ec54bbf0899dd6f2185ded /fs/open.c
parent613aee94dddf07de9fde8dd4fcb6e4579cde8a65 (diff)
downloadlinux-af58dc1f50c1946018773beca23ebaad587b9cc9.tar.xz
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.c5
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);