Lines Matching refs:up
117 static void uid_hash_insert(struct user_struct *up, struct hlist_head *hashent) in uid_hash_insert() argument
119 hlist_add_head(&up->uidhash_node, hashent); in uid_hash_insert()
122 static void uid_hash_remove(struct user_struct *up) in uid_hash_remove() argument
124 hlist_del_init(&up->uidhash_node); in uid_hash_remove()
141 static int user_epoll_alloc(struct user_struct *up) in user_epoll_alloc() argument
144 return percpu_counter_init(&up->epoll_watches, 0, GFP_KERNEL); in user_epoll_alloc()
150 static void user_epoll_free(struct user_struct *up) in user_epoll_free() argument
153 percpu_counter_destroy(&up->epoll_watches); in user_epoll_free()
161 static void free_user(struct user_struct *up, unsigned long flags) in free_user() argument
164 uid_hash_remove(up); in free_user()
166 user_epoll_free(up); in free_user()
167 kmem_cache_free(uid_cachep, up); in free_user()
187 void free_uid(struct user_struct *up) in free_uid() argument
191 if (!up) in free_uid()
194 if (refcount_dec_and_lock_irqsave(&up->__count, &uidhash_lock, &flags)) in free_uid()
195 free_user(up, flags); in free_uid()
202 struct user_struct *up, *new; in alloc_uid() local
205 up = uid_hash_find(uid, hashent); in alloc_uid()
208 if (!up) { in alloc_uid()
227 up = uid_hash_find(uid, hashent); in alloc_uid()
228 if (up) { in alloc_uid()
233 up = new; in alloc_uid()
238 return up; in alloc_uid()