summaryrefslogtreecommitdiff
path: root/fs/init.c
diff options
context:
space:
mode:
authorChristian Brauner <christian.brauner@ubuntu.com>2021-01-21 14:19:21 +0100
committerChristian Brauner <christian.brauner@ubuntu.com>2021-01-24 14:27:15 +0100
commite6c9a71451560edba343cbcbd500bea0a188f0d1 (patch)
tree689f45bcb86d6d18f8b874e9b1e9e48d8b4d9ef8 /fs/init.c
parenta6435940b62f81a1718bf2bd46a051379fc89b9d (diff)
fs: add id translation helpers
Add simple helpers to make it easy to map kuids into and from idmapped mounts. We provide simple wrappers that filesystems can use to e.g. initialize inodes similar to i_{uid,gid}_read() and i_{uid,gid}_write(). Accessing an inode through an idmapped mount maps the i_uid and i_gid of the inode to the mount's user namespace. If the fsids are used to initialize inodes they are unmapped according to the mount's user namespace. Passing the initial user namespace to these helpers makes them a nop and so any non-idmapped paths will not be impacted. Link: https://lore.kernel.org/r/20210121131959.646623-3-christian.brauner@ubuntu.com 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> Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'fs/init.c')
0 files changed, 0 insertions, 0 deletions