Skip to content

Commit af6da56

Browse files
author
Kent Overstreet
committed
uidgid: Split out uidgid_types.h
More sched.h dependency pruning. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev> Reviewed-by: Christian Brauner <brauner@kernel.org>
1 parent a6e1420 commit af6da56

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

include/linux/sched.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <linux/kcsan.h>
3838
#include <linux/rv.h>
3939
#include <linux/livepatch_sched.h>
40+
#include <linux/uidgid_types.h>
4041
#include <asm/kmap_size.h>
4142

4243
/* task_struct member predeclarations (sorted alphabetically): */

include/linux/uidgid.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,12 @@
1212
* to detect when we overlook these differences.
1313
*
1414
*/
15-
#include <linux/types.h>
15+
#include <linux/uidgid_types.h>
1616
#include <linux/highuid.h>
1717

1818
struct user_namespace;
1919
extern struct user_namespace init_user_ns;
2020

21-
typedef struct {
22-
uid_t val;
23-
} kuid_t;
24-
25-
26-
typedef struct {
27-
gid_t val;
28-
} kgid_t;
29-
3021
#define KUIDT_INIT(value) (kuid_t){ value }
3122
#define KGIDT_INIT(value) (kgid_t){ value }
3223

include/linux/uidgid_types.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _LINUX_UIDGID_TYPES_H
3+
#define _LINUX_UIDGID_TYPES_H
4+
5+
#include <linux/types.h>
6+
7+
typedef struct {
8+
uid_t val;
9+
} kuid_t;
10+
11+
typedef struct {
12+
gid_t val;
13+
} kgid_t;
14+
15+
#endif /* _LINUX_UIDGID_TYPES_H */

0 commit comments

Comments
 (0)