diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-07-27 12:48:48 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:13 +0200 |
commit | 98b6ab5fc0988242114a4f0e02ed225685d9cc2b (patch) | |
tree | 3b52e8c1c643a86ee8d92d684f9bc3d6d8b9bd0d /fs/btrfs/inode.c | |
parent | btrfs: allow idmapped symlink inode op (diff) | |
download | linux-98b6ab5fc0988242114a4f0e02ed225685d9cc2b.tar.xz linux-98b6ab5fc0988242114a4f0e02ed225685d9cc2b.zip |
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: 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/inode.c')
-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 0ffd48f9b685..c040d9925077 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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); |