Commit 72105277 authored by Christian Brauner's avatar Christian Brauner Committed by David Sterba

btrfs: allow idmapped mknod inode op

Enable btrfs_mknod() to handle idmapped mounts. This is just a matter of
passing down the mount's userns.
Reviewed-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c020d2ea
...@@ -6717,7 +6717,7 @@ static int btrfs_mknod(struct user_namespace *mnt_userns, struct inode *dir, ...@@ -6717,7 +6717,7 @@ static int btrfs_mknod(struct user_namespace *mnt_userns, struct inode *dir,
if (err) if (err)
goto out_unlock; goto out_unlock;
inode = btrfs_new_inode(trans, root, &init_user_ns, dir, inode = btrfs_new_inode(trans, root, mnt_userns, dir,
dentry->d_name.name, dentry->d_name.len, dentry->d_name.name, dentry->d_name.len,
btrfs_ino(BTRFS_I(dir)), objectid, mode, &index); btrfs_ino(BTRFS_I(dir)), objectid, mode, &index);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment