summaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChristian Brauner <christian.brauner@ubuntu.com>2021-07-27 12:48:50 +0200
committerDavid Sterba <dsterba@suse.com>2021-08-23 13:19:13 +0200
commit3bc71ba02cf5376b390289bef8c9f5d6049f1866 (patch)
tree18764befa514f82458ccfd23a76e4da977ac4b54 /fs/btrfs
parentd4d09464614227a6cc9ae42cd1d761e4320e4ebc (diff)
downloadlinux-3bc71ba02cf5376b390289bef8c9f5d6049f1866.tar.bz2
btrfs: allow idmapped permission inode op
Enable btrfs_permission() 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 88ac63f3b57b..6ef2448a9937 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -10403,7 +10403,7 @@ static int btrfs_permission(struct user_namespace *mnt_userns,
if (BTRFS_I(inode)->flags & BTRFS_INODE_READONLY)
return -EACCES;
}
- return generic_permission(&init_user_ns, inode, mask);
+ return generic_permission(mnt_userns, inode, mask);
}
static int btrfs_tmpfile(struct user_namespace *mnt_userns, struct inode *dir,