Merge tag 'driver-core-5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / fs / debugfs / inode.c
index 86c7f04..22e86ae 100644 (file)
@@ -42,13 +42,14 @@ static unsigned int debugfs_allow = DEFAULT_DEBUGFS_ALLOW_BITS;
  * so that we can use the file mode as part of a heuristic to determine whether
  * to lock down individual files.
  */
-static int debugfs_setattr(struct dentry *dentry, struct iattr *ia)
+static int debugfs_setattr(struct user_namespace *mnt_userns,
+                          struct dentry *dentry, struct iattr *ia)
 {
        int ret = security_locked_down(LOCKDOWN_DEBUGFS);
 
        if (ret && (ia->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)))
                return ret;
-       return simple_setattr(dentry, ia);
+       return simple_setattr(&init_user_ns, dentry, ia);
 }
 
 static const struct inode_operations debugfs_file_inode_operations = {
@@ -778,8 +779,8 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
 
        take_dentry_name_snapshot(&old_name, old_dentry);
 
-       error = simple_rename(d_inode(old_dir), old_dentry, d_inode(new_dir),
-                             dentry, 0);
+       error = simple_rename(&init_user_ns, d_inode(old_dir), old_dentry,
+                             d_inode(new_dir), dentry, 0);
        if (error) {
                release_dentry_name_snapshot(&old_name);
                goto exit;