diff options
| author | Chris Wright <chrisw@osdl.org> | 2004-06-17 17:56:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-06-17 17:56:43 -0700 |
| commit | db49b0f961a5704409acb5145ec7cb134be1b450 (patch) | |
| tree | b17469534c6afa47931f04238996b70202391bb6 /include/linux | |
| parent | 84f4d297ef3006d84ff35a0cedab2720e0bb5fd0 (diff) | |
[PATCH] RLIM: add simple get_uid() helper
Add simple helper function to grab a reference to a user_struct.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index d9d9377fd3ff..b81e02838224 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -720,6 +720,11 @@ extern void __set_special_pids(pid_t session, pid_t pgrp); /* per-UID process charging. */ extern struct user_struct * alloc_uid(uid_t); +static inline struct user_struct *get_uid(struct user_struct *u) +{ + atomic_inc(&u->__count); + return u; +} extern void free_uid(struct user_struct *); extern void switch_uid(struct user_struct *); |
