Thread (53 messages) 53 messages, 8 authors, 2020-11-02

Re: [PATCH 06/34] fs: add id translation helpers

From: Christoph Hellwig <hch@infradead.org>
Date: 2020-11-01 14:46:38
Also in: linux-ext4, linux-fsdevel, linux-integrity, linux-security-module, linux-unionfs, selinux

+static inline kuid_t kuid_into_mnt(struct user_namespace *to, kuid_t kuid)
+{
+#ifdef CONFIG_IDMAP_MOUNTS
+	return make_kuid(to, __kuid_val(kuid));
+#else
+	return kuid;
+#endif
+}
+
+static inline kgid_t kgid_into_mnt(struct user_namespace *to, kgid_t kgid)
+{
+#ifdef CONFIG_IDMAP_MOUNTS
+	return make_kgid(to, __kgid_val(kgid));
+#else
+	return kgid;
+#endif
If you want to keep the config option please at least have on
#ifdef/#else/#endif instead of this mess.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help