From: Christian Brauner Date: Tue, 27 Jul 2021 10:48:47 +0000 (+0200) Subject: btrfs: allow idmapped symlink inode op X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5a0521086e5fc5eb51690d4fc63fd26fdb5ae881;p=linux.git btrfs: allow idmapped symlink inode op Enable btrfs_symlink() 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 16bd56edb8e16..0ffd48f9b6854 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -10077,7 +10077,7 @@ static int btrfs_symlink(struct user_namespace *mnt_userns, struct inode *dir, if (err) 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, btrfs_ino(BTRFS_I(dir)), objectid, S_IFLNK | S_IRWXUGO, &index);