diff options
Diffstat (limited to 'include/linux/sched/user.h')
| -rw-r--r-- | include/linux/sched/user.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sched/user.h b/include/linux/sched/user.h index 96fe289c4c6e..39ad98c09c58 100644 --- a/include/linux/sched/user.h +++ b/include/linux/sched/user.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #include <linux/uidgid.h> | 5 | #include <linux/uidgid.h> |
| 6 | #include <linux/atomic.h> | 6 | #include <linux/atomic.h> |
| 7 | #include <linux/refcount.h> | ||
| 7 | #include <linux/ratelimit.h> | 8 | #include <linux/ratelimit.h> |
| 8 | 9 | ||
| 9 | struct key; | 10 | struct key; |
| @@ -12,7 +13,7 @@ struct key; | |||
| 12 | * Some day this will be a full-fledged user tracking system.. | 13 | * Some day this will be a full-fledged user tracking system.. |
| 13 | */ | 14 | */ |
| 14 | struct user_struct { | 15 | struct user_struct { |
| 15 | atomic_t __count; /* reference count */ | 16 | refcount_t __count; /* reference count */ |
| 16 | atomic_t processes; /* How many processes does this user have? */ | 17 | atomic_t processes; /* How many processes does this user have? */ |
| 17 | atomic_t sigpending; /* How many pending signals does this user have? */ | 18 | atomic_t sigpending; /* How many pending signals does this user have? */ |
| 18 | #ifdef CONFIG_FANOTIFY | 19 | #ifdef CONFIG_FANOTIFY |
| @@ -59,7 +60,7 @@ extern struct user_struct root_user; | |||
| 59 | extern struct user_struct * alloc_uid(kuid_t); | 60 | extern struct user_struct * alloc_uid(kuid_t); |
| 60 | static inline struct user_struct *get_uid(struct user_struct *u) | 61 | static inline struct user_struct *get_uid(struct user_struct *u) |
| 61 | { | 62 | { |
| 62 | atomic_inc(&u->__count); | 63 | refcount_inc(&u->__count); |
| 63 | return u; | 64 | return u; |
| 64 | } | 65 | } |
| 65 | extern void free_uid(struct user_struct *); | 66 | extern void free_uid(struct user_struct *); |
