[PATCH 4/11] add simple get_uid() helper

From: Chris Wright
Date: Tue May 11 2004 - 03:56:25 EST


Add simple helper function to grab a reference to a user_struct.

===== include/linux/sched.h 1.210 vs edited =====
--- 1.210/include/linux/sched.h Mon May 10 04:25:34 2004
+++ edited/include/linux/sched.h Mon May 10 18:22:10 2004
@@ -714,6 +714,11 @@

/* 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 *);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/