diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-07-27 12:48:43 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-08-23 13:19:12 +0200 |
commit | c020d2eaf1a84ba8611fe2a232f4951faa98e0e0 (patch) | |
tree | 3caac7bab0afd7c821f4e091ea85e841974cdc7a /fs/btrfs | |
parent | ca07274c3da901c7daa2c9280679c282b7c03bef (diff) | |
download | lwn-c020d2eaf1a84ba8611fe2a232f4951faa98e0e0.tar.gz lwn-c020d2eaf1a84ba8611fe2a232f4951faa98e0e0.zip |
btrfs: allow idmapped getattr inode op
Enable btrfs_getattr() 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 04a37b750a17..04a30cab799d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -9288,7 +9288,7 @@ static int btrfs_getattr(struct user_namespace *mnt_userns, STATX_ATTR_IMMUTABLE | STATX_ATTR_NODUMP); - generic_fillattr(&init_user_ns, inode, stat); + generic_fillattr(mnt_userns, inode, stat); stat->dev = BTRFS_I(inode)->root->anon_dev; spin_lock(&BTRFS_I(inode)->lock); |