Commit db49b0f9 authored by Chris Wright's avatar Chris Wright Committed by Linus Torvalds

[PATCH] RLIM: add simple get_uid() helper

Add simple helper function to grab a reference to a user_struct.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 84f4d297
......@@ -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 *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment