aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/user.c')
-rw-r--r--kernel/user.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/kernel/user.c b/kernel/user.c
index 7e8215d87b40..e91331c457e2 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -44,7 +44,6 @@ struct user_struct root_user = {
44 .processes = ATOMIC_INIT(1), 44 .processes = ATOMIC_INIT(1),
45 .files = ATOMIC_INIT(0), 45 .files = ATOMIC_INIT(0),
46 .sigpending = ATOMIC_INIT(0), 46 .sigpending = ATOMIC_INIT(0),
47 .mq_bytes = 0,
48 .locked_shm = 0, 47 .locked_shm = 0,
49#ifdef CONFIG_KEYS 48#ifdef CONFIG_KEYS
50 .uid_keyring = &root_user_keyring, 49 .uid_keyring = &root_user_keyring,
@@ -58,19 +57,17 @@ struct user_struct root_user = {
58/* 57/*
59 * These routines must be called with the uidhash spinlock held! 58 * These routines must be called with the uidhash spinlock held!
60 */ 59 */
61static inline void uid_hash_insert(struct user_struct *up, 60static void uid_hash_insert(struct user_struct *up, struct hlist_head *hashent)
62 struct hlist_head *hashent)
63{ 61{
64 hlist_add_head(&up->uidhash_node, hashent); 62 hlist_add_head(&up->uidhash_node, hashent);
65} 63}
66 64
67static inline void uid_hash_remove(struct user_struct *up) 65static void uid_hash_remove(struct user_struct *up)
68{ 66{
69 hlist_del_init(&up->uidhash_node); 67 hlist_del_init(&up->uidhash_node);
70} 68}
71 69
72static inline struct user_struct *uid_hash_find(uid_t uid, 70static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)
73 struct hlist_head *hashent)
74{ 71{
75 struct user_struct *user; 72 struct user_struct *user;
76 struct hlist_node *h; 73 struct hlist_node *h;
@@ -350,8 +347,9 @@ struct user_struct * alloc_uid(struct user_namespace *ns, uid_t uid)
350 atomic_set(&new->inotify_watches, 0); 347 atomic_set(&new->inotify_watches, 0);
351 atomic_set(&new->inotify_devs, 0); 348 atomic_set(&new->inotify_devs, 0);
352#endif 349#endif
353 350#ifdef CONFIG_POSIX_MQUEUE
354 new->mq_bytes = 0; 351 new->mq_bytes = 0;
352#endif
355 new->locked_shm = 0; 353 new->locked_shm = 0;
356 354
357 if (alloc_uid_keyring(new, current) < 0) { 355 if (alloc_uid_keyring(new, current) < 0) {