Commit 98b6ab5f authored by Christian Brauner's avatar Christian Brauner Committed by David Sterba
Browse files

btrfs: allow idmapped tmpfile inode op



Enable btrfs_tmpfile() 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 5a052108
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10429,7 +10429,7 @@ static int btrfs_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,
	if (ret)
		goto out;

	inode = btrfs_new_inode(trans, root, &init_user_ns, dir, NULL, 0,
	inode = btrfs_new_inode(trans, root, mnt_userns, dir, NULL, 0,
			btrfs_ino(BTRFS_I(dir)), objectid, mode, &index);
	if (IS_ERR(inode)) {
		ret = PTR_ERR(inode);