uidgid: Split out uidgid_types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 20:51:30 +0000 (15:51 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 21 Dec 2023 00:26:32 +0000 (19:26 -0500)
More sched.h dependency pruning.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Reviewed-by: Christian Brauner <brauner@kernel.org>
include/linux/sched.h
include/linux/uidgid.h
include/linux/uidgid_types.h [new file with mode: 0644]

index db6e3e62960650dec5edefa6ea177c8db55ec383..10e25c7fc793601e1294aa3740477c35cd6e5ee1 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/kcsan.h>
 #include <linux/rv.h>
 #include <linux/livepatch_sched.h>
+#include <linux/uidgid_types.h>
 #include <asm/kmap_size.h>
 
 /* task_struct member predeclarations (sorted alphabetically): */
index b0542cd11aeb09f5d0c979e1acf31ad8d550bb6d..ba20b62f13e1d6f2fd1ba41f424b8ffe01f10dc9 100644 (file)
  * to detect when we overlook these differences.
  *
  */
-#include <linux/types.h>
+#include <linux/uidgid_types.h>
 #include <linux/highuid.h>
 
 struct user_namespace;
 extern struct user_namespace init_user_ns;
 
-typedef struct {
-       uid_t val;
-} kuid_t;
-
-
-typedef struct {
-       gid_t val;
-} kgid_t;
-
 #define KUIDT_INIT(value) (kuid_t){ value }
 #define KGIDT_INIT(value) (kgid_t){ value }
 
diff --git a/include/linux/uidgid_types.h b/include/linux/uidgid_types.h
new file mode 100644 (file)
index 0000000..b35ac49
--- /dev/null
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_UIDGID_TYPES_H
+#define _LINUX_UIDGID_TYPES_H
+
+#include <linux/types.h>
+
+typedef struct {
+       uid_t val;
+} kuid_t;
+
+typedef struct {
+       gid_t val;
+} kgid_t;
+
+#endif /* _LINUX_UIDGID_TYPES_H */