|
Kmods SIG |
50e2b3 |
From 0d56a4518d5eaf595a24ab2202e171330bb2ed72 Mon Sep 17 00:00:00 2001
|
|
Kmods SIG |
50e2b3 |
From: Christian Brauner <christian.brauner@ubuntu.com>
|
|
Kmods SIG |
50e2b3 |
Date: Thu, 21 Jan 2021 14:19:30 +0100
|
|
Kmods SIG |
50e2b3 |
Subject: [Backport 0d56a4518d5e] stat: handle idmapped mounts
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
The generic_fillattr() helper fills in the basic attributes associated
|
|
Kmods SIG |
50e2b3 |
with an inode. Enable it to handle idmapped mounts. If the inode is
|
|
Kmods SIG |
50e2b3 |
accessed through an idmapped mount map it into the mount's user
|
|
Kmods SIG |
50e2b3 |
namespace before we store the uid and gid. If the initial user namespace
|
|
Kmods SIG |
50e2b3 |
is passed nothing changes so non-idmapped mounts will see identical
|
|
Kmods SIG |
50e2b3 |
behavior as before.
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
Link: https://lore.kernel.org/r/20210121131959.646623-12-christian.brauner@ubuntu.com
|
|
Kmods SIG |
50e2b3 |
Cc: Christoph Hellwig <hch@lst.de>
|
|
Kmods SIG |
50e2b3 |
Cc: David Howells <dhowells@redhat.com>
|
|
Kmods SIG |
50e2b3 |
Cc: Al Viro <viro@zeniv.linux.org.uk>
|
|
Kmods SIG |
50e2b3 |
Cc: linux-fsdevel@vger.kernel.org
|
|
Kmods SIG |
50e2b3 |
Reviewed-by: Christoph Hellwig <hch@lst.de>
|
|
Kmods SIG |
50e2b3 |
Reviewed-by: James Morris <jamorris@linux.microsoft.com>
|
|
Kmods SIG |
50e2b3 |
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
|
|
Kmods SIG |
50e2b3 |
---
|
|
Kmods SIG |
50e2b3 |
src/file.c | 2 +-
|
|
Kmods SIG |
50e2b3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
diff --git a/src/file.c b/src/file.c
|
|
Kmods SIG |
50e2b3 |
index ace35aa8e64b7f416f26cfa194253d27389dfc7f..e9705b3295d31def9c56d86955da9ef359fd9567 100644
|
|
Kmods SIG |
50e2b3 |
--- a/src/file.c
|
|
Kmods SIG |
50e2b3 |
+++ b/src/file.c
|
|
Kmods SIG |
50e2b3 |
@@ -273,7 +273,7 @@ int exfat_getattr(const struct path *path, struct kstat *stat,
|
|
Kmods SIG |
50e2b3 |
struct inode *inode = d_backing_inode(path->dentry);
|
|
Kmods SIG |
50e2b3 |
struct exfat_inode_info *ei = EXFAT_I(inode);
|
|
Kmods SIG |
50e2b3 |
|
|
Kmods SIG |
50e2b3 |
- generic_fillattr(inode, stat);
|
|
Kmods SIG |
50e2b3 |
+ generic_fillattr(&init_user_ns, inode, stat);
|
|
Kmods SIG |
50e2b3 |
exfat_truncate_atime(&stat->atime);
|
|
Kmods SIG |
50e2b3 |
stat->result_mask |= STATX_BTIME;
|
|
Kmods SIG |
50e2b3 |
stat->btime.tv_sec = ei->i_crtime.tv_sec;
|
|
Kmods SIG |
50e2b3 |
--
|
|
Kmods SIG |
50e2b3 |
2.31.1
|
|
Kmods SIG |
50e2b3 |
|