diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-21 14:19:21 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-24 14:27:15 +0100 |
commit | e6c9a71451560edba343cbcbd500bea0a188f0d1 (patch) | |
tree | 689f45bcb86d6d18f8b874e9b1e9e48d8b4d9ef8 /fs/notify/inotify | |
parent | mount: attach mappings to mounts (diff) | |
download | linux-e6c9a71451560edba343cbcbd500bea0a188f0d1.tar.xz linux-e6c9a71451560edba343cbcbd500bea0a188f0d1.zip |
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/notify/inotify')
0 files changed, 0 insertions, 0 deletions