Merge tag 'for-6.1-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
[platform/kernel/linux-starfive.git] / fs / ext2 / namei.c
index 5fd9a22..9125eab 100644 (file)
@@ -120,7 +120,7 @@ static int ext2_create (struct user_namespace * mnt_userns,
 }
 
 static int ext2_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,
-                       struct dentry *dentry, umode_t mode)
+                       struct file *file, umode_t mode)
 {
        struct inode *inode = ext2_new_inode(dir, mode, NULL);
        if (IS_ERR(inode))
@@ -128,9 +128,9 @@ static int ext2_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,
 
        ext2_set_file_ops(inode);
        mark_inode_dirty(inode);
-       d_tmpfile(dentry, inode);
+       d_tmpfile(file, inode);
        unlock_new_inode(inode);
-       return 0;
+       return finish_open_simple(file, 0);
 }
 
 static int ext2_mknod (struct user_namespace * mnt_userns, struct inode * dir,