summaryrefslogtreecommitdiff
path: root/include/linux/mnt_idmapping.h
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2022-06-29 13:15:10 +0200
committerChristian Brauner (Microsoft) <brauner@kernel.org>2022-06-29 13:15:10 +0200
commitfc04dafd263d8c0b0251b63d47f35b29373d50f2 (patch)
tree37d2f58aba4fac1b70d66507f00c6ad8e3d00ac9 /include/linux/mnt_idmapping.h
parent9adf24a40978c19f57f44572b292b38938da7686 (diff)
mnt_idmapping: use new helpers in mapped_fs{g,u}id()
The old non-type safe helpers will soon be removed. Cc: Seth Forshee <sforshee@digitalocean.com> Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Diffstat (limited to 'include/linux/mnt_idmapping.h')
-rw-r--r--include/linux/mnt_idmapping.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/mnt_idmapping.h b/include/linux/mnt_idmapping.h
index 21bd22a7b326..be83643cadff 100644
--- a/include/linux/mnt_idmapping.h
+++ b/include/linux/mnt_idmapping.h
@@ -422,7 +422,8 @@ static inline bool vfsgid_has_fsmapping(struct user_namespace *mnt_userns,
static inline kuid_t mapped_fsuid(struct user_namespace *mnt_userns,
struct user_namespace *fs_userns)
{
- return mapped_kuid_user(mnt_userns, fs_userns, current_fsuid());
+ return from_vfsuid(mnt_userns, fs_userns,
+ VFSUIDT_INIT(current_fsuid()));
}
/**
@@ -441,7 +442,8 @@ static inline kuid_t mapped_fsuid(struct user_namespace *mnt_userns,
static inline kgid_t mapped_fsgid(struct user_namespace *mnt_userns,
struct user_namespace *fs_userns)
{
- return mapped_kgid_user(mnt_userns, fs_userns, current_fsgid());
+ return from_vfsgid(mnt_userns, fs_userns,
+ VFSGIDT_INIT(current_fsgid()));
}
#endif /* _LINUX_MNT_IDMAPPING_H */