diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-07-27 12:48:44 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:12 +0200 |
commit | 72105277dcfca69175cea713f5edda4132839e14 (patch) | |
tree | ed76a3767bfdc55c7d57bcf2fada983e5e3c6824 /fs/btrfs | |
parent | c020d2eaf1a84ba8611fe2a232f4951faa98e0e0 (diff) | |
download | linux-72105277dcfca69175cea713f5edda4132839e14.tar.bz2 |
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: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 04a30cab799d..4a1cc106ab1f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6717,7 +6717,7 @@ static int btrfs_mknod(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, mode, &index); if (IS_ERR(inode)) { |