path: root/mm/memcontrol.c
diff options
authorChristian Brauner <>2021-01-21 14:19:21 +0100
committerChristian Brauner <>2021-01-24 14:27:15 +0100
commite6c9a71451560edba343cbcbd500bea0a188f0d1 (patch)
tree689f45bcb86d6d18f8b874e9b1e9e48d8b4d9ef8 /mm/memcontrol.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: Cc: David Howells <> Cc: Al Viro <> Cc: Reviewed-by: Christoph Hellwig <> Signed-off-by: Christian Brauner <>
Diffstat (limited to 'mm/memcontrol.c')
0 files changed, 0 insertions, 0 deletions