diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-21 14:19:30 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-24 14:27:17 +0100 |
commit | 0d56a4518d5eaf595a24ab2202e171330bb2ed72 (patch) | |
tree | 8abcffb945ef36eb5bd290271a34a246c1d9379d /fs/f2fs | |
parent | 71bc356f93a1c589fad13f7487258f89c417976e (diff) | |
download | linux-stable-0d56a4518d5eaf595a24ab2202e171330bb2ed72.tar.gz linux-stable-0d56a4518d5eaf595a24ab2202e171330bb2ed72.tar.bz2 linux-stable-0d56a4518d5eaf595a24ab2202e171330bb2ed72.zip |
stat: handle idmapped mounts
The generic_fillattr() helper fills in the basic attributes associated
with an inode. Enable it to handle idmapped mounts. If the inode is
accessed through an idmapped mount map it into the mount's user
namespace before we store the uid and gid. If the initial user namespace
is passed nothing changes so non-idmapped mounts will see identical
behavior as before.
Link: https://lore.kernel.org/r/20210121131959.646623-12-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 6ccdfe0606d9..44cd0dbdbb5d 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -820,7 +820,7 @@ int f2fs_getattr(const struct path *path, struct kstat *stat, STATX_ATTR_NODUMP | STATX_ATTR_VERITY); - generic_fillattr(inode, stat); + generic_fillattr(&init_user_ns, inode, stat); /* we need to show initial sectors used for inline_data/dentries */ if ((S_ISREG(inode->i_mode) && f2fs_has_inline_data(inode)) || |