Lines Matching refs:mnt_userns
167 static inline bool no_idmapping(const struct user_namespace *mnt_userns, in no_idmapping() argument
170 return initial_idmapping(mnt_userns) || mnt_userns == fs_userns; in no_idmapping()
194 static inline vfsuid_t make_vfsuid(struct user_namespace *mnt_userns, in make_vfsuid() argument
200 if (no_idmapping(mnt_userns, fs_userns)) in make_vfsuid()
208 return VFSUIDT_INIT(make_kuid(mnt_userns, uid)); in make_vfsuid()
211 static inline kuid_t mapped_kuid_fs(struct user_namespace *mnt_userns, in mapped_kuid_fs() argument
215 return AS_KUIDT(make_vfsuid(mnt_userns, fs_userns, kuid)); in mapped_kuid_fs()
239 static inline vfsgid_t make_vfsgid(struct user_namespace *mnt_userns, in make_vfsgid() argument
245 if (no_idmapping(mnt_userns, fs_userns)) in make_vfsgid()
253 return VFSGIDT_INIT(make_kgid(mnt_userns, gid)); in make_vfsgid()
256 static inline kgid_t mapped_kgid_fs(struct user_namespace *mnt_userns, in mapped_kgid_fs() argument
260 return AS_KGIDT(make_vfsgid(mnt_userns, fs_userns, kgid)); in mapped_kgid_fs()
274 static inline kuid_t from_vfsuid(struct user_namespace *mnt_userns, in from_vfsuid() argument
280 if (no_idmapping(mnt_userns, fs_userns)) in from_vfsuid()
282 uid = from_kuid(mnt_userns, AS_KUIDT(vfsuid)); in from_vfsuid()
310 static inline kuid_t mapped_kuid_user(struct user_namespace *mnt_userns, in mapped_kuid_user() argument
314 return from_vfsuid(mnt_userns, fs_userns, VFSUIDT_INIT(kuid)); in mapped_kuid_user()
329 static inline bool vfsuid_has_fsmapping(struct user_namespace *mnt_userns, in vfsuid_has_fsmapping() argument
333 return uid_valid(from_vfsuid(mnt_userns, fs_userns, vfsuid)); in vfsuid_has_fsmapping()
360 static inline kgid_t from_vfsgid(struct user_namespace *mnt_userns, in from_vfsgid() argument
366 if (no_idmapping(mnt_userns, fs_userns)) in from_vfsgid()
368 gid = from_kgid(mnt_userns, AS_KGIDT(vfsgid)); in from_vfsgid()
396 static inline kgid_t mapped_kgid_user(struct user_namespace *mnt_userns, in mapped_kgid_user() argument
400 return from_vfsgid(mnt_userns, fs_userns, VFSGIDT_INIT(kgid)); in mapped_kgid_user()
415 static inline bool vfsgid_has_fsmapping(struct user_namespace *mnt_userns, in vfsgid_has_fsmapping() argument
419 return gid_valid(from_vfsgid(mnt_userns, fs_userns, vfsgid)); in vfsgid_has_fsmapping()
448 static inline kuid_t mapped_fsuid(struct user_namespace *mnt_userns, in mapped_fsuid() argument
451 return from_vfsuid(mnt_userns, fs_userns, in mapped_fsuid()
468 static inline kgid_t mapped_fsgid(struct user_namespace *mnt_userns, in mapped_fsgid() argument
471 return from_vfsgid(mnt_userns, fs_userns, in mapped_fsgid()