From: Christian Brauner Date: Tue, 27 Jul 2021 10:48:46 +0000 (+0200) Subject: btrfs: allow idmapped mkdir inode op X-Git-Tag: howlett/maple/20220722_2~2473^2~19 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b0b3e44d346c91dde3899d37eddf867b9b36ffdc;p=users%2Fjedix%2Flinux-maple.git btrfs: allow idmapped mkdir inode op Enable btrfs_mkdir() to handle idmapped mounts. This is just a matter of passing down the mount's userns. Reviewed-by: Josef Bacik Signed-off-by: Christian Brauner Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a75661cd68ec..16bd56edb8e1 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6926,7 +6926,7 @@ static int btrfs_mkdir(struct user_namespace *mnt_userns, struct inode *dir, if (err) goto out_fail; - 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, btrfs_ino(BTRFS_I(dir)), objectid, S_IFDIR | mode, &index);