diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-07-27 12:48:50 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:13 +0200 |
commit | 3bc71ba02cf5376b390289bef8c9f5d6049f1866 (patch) | |
tree | 18764befa514f82458ccfd23a76e4da977ac4b54 /fs/btrfs | |
parent | d4d09464614227a6cc9ae42cd1d761e4320e4ebc (diff) | |
download | linux-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.c | 2 |
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, |