Lines Matching refs:ref
81 reference_t *ref; in refcount_destroy_many() local
84 while (ref = list_head(&rc->rc_list)) { in refcount_destroy_many()
85 list_remove(&rc->rc_list, ref); in refcount_destroy_many()
86 kmem_cache_free(reference_cache, ref); in refcount_destroy_many()
90 while (ref = list_head(&rc->rc_removed)) { in refcount_destroy_many()
91 list_remove(&rc->rc_removed, ref); in refcount_destroy_many()
92 kmem_cache_free(reference_history_cache, ref->ref_removed); in refcount_destroy_many()
93 kmem_cache_free(reference_cache, ref); in refcount_destroy_many()
120 reference_t *ref = NULL; in refcount_add_many() local
124 ref = kmem_cache_alloc(reference_cache, KM_SLEEP); in refcount_add_many()
125 ref->ref_holder = holder; in refcount_add_many()
126 ref->ref_number = number; in refcount_add_many()
131 list_insert_head(&rc->rc_list, ref); in refcount_add_many()
148 reference_t *ref; in refcount_remove_many() local
161 for (ref = list_head(&rc->rc_list); ref; in refcount_remove_many()
162 ref = list_next(&rc->rc_list, ref)) { in refcount_remove_many()
163 if (ref->ref_holder == holder && ref->ref_number == number) { in refcount_remove_many()
164 list_remove(&rc->rc_list, ref); in refcount_remove_many()
166 ref->ref_removed = in refcount_remove_many()
169 list_insert_head(&rc->rc_removed, ref); in refcount_remove_many()
172 ref = list_tail(&rc->rc_removed); in refcount_remove_many()
173 list_remove(&rc->rc_removed, ref); in refcount_remove_many()
175 ref->ref_removed); in refcount_remove_many()
176 kmem_cache_free(reference_cache, ref); in refcount_remove_many()
180 kmem_cache_free(reference_cache, ref); in refcount_remove_many()