Lines Matching refs:up
108 static void uid_hash_insert(struct user_struct *up, struct hlist_head *hashent) in uid_hash_insert() argument
110 hlist_add_head(&up->uidhash_node, hashent); in uid_hash_insert()
113 static void uid_hash_remove(struct user_struct *up) in uid_hash_remove() argument
115 hlist_del_init(&up->uidhash_node); in uid_hash_remove()
132 static int user_epoll_alloc(struct user_struct *up) in user_epoll_alloc() argument
135 return percpu_counter_init(&up->epoll_watches, 0, GFP_KERNEL); in user_epoll_alloc()
141 static void user_epoll_free(struct user_struct *up) in user_epoll_free() argument
144 percpu_counter_destroy(&up->epoll_watches); in user_epoll_free()
152 static void free_user(struct user_struct *up, unsigned long flags) in free_user() argument
155 uid_hash_remove(up); in free_user()
157 user_epoll_free(up); in free_user()
158 kmem_cache_free(uid_cachep, up); in free_user()
178 void free_uid(struct user_struct *up) in free_uid() argument
182 if (!up) in free_uid()
185 if (refcount_dec_and_lock_irqsave(&up->__count, &uidhash_lock, &flags)) in free_uid()
186 free_user(up, flags); in free_uid()
193 struct user_struct *up, *new; in alloc_uid() local
196 up = uid_hash_find(uid, hashent); in alloc_uid()
199 if (!up) { in alloc_uid()
218 up = uid_hash_find(uid, hashent); in alloc_uid()
219 if (up) { in alloc_uid()
224 up = new; in alloc_uid()
229 return up; in alloc_uid()