mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
71bc356f93
commit
0d56a4518d
36 changed files with 54 additions and 46 deletions
|
@ -903,7 +903,7 @@ int orangefs_getattr(const struct path *path, struct kstat *stat,
|
|||
ret = orangefs_inode_getattr(inode,
|
||||
request_mask & STATX_SIZE ? ORANGEFS_GETATTR_SIZE : 0);
|
||||
if (ret == 0) {
|
||||
generic_fillattr(inode, stat);
|
||||
generic_fillattr(&init_user_ns, inode, stat);
|
||||
|
||||
/* override block size reported to stat */
|
||||
if (!(request_mask & STATX_SIZE))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue