Lines Matching refs:head
41 struct tomoyo_io_buffer *head; in tomoyo_struct_used_by_io_buffer() local
45 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_struct_used_by_io_buffer()
46 head->users++; in tomoyo_struct_used_by_io_buffer()
48 mutex_lock(&head->io_sem); in tomoyo_struct_used_by_io_buffer()
49 if (head->r.domain == element || head->r.group == element || in tomoyo_struct_used_by_io_buffer()
50 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer()
52 mutex_unlock(&head->io_sem); in tomoyo_struct_used_by_io_buffer()
54 head->users--; in tomoyo_struct_used_by_io_buffer()
72 struct tomoyo_io_buffer *head; in tomoyo_name_used_by_io_buffer() local
77 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_name_used_by_io_buffer()
79 head->users++; in tomoyo_name_used_by_io_buffer()
81 mutex_lock(&head->io_sem); in tomoyo_name_used_by_io_buffer()
83 const char *w = head->r.w[i]; in tomoyo_name_used_by_io_buffer()
89 mutex_unlock(&head->io_sem); in tomoyo_name_used_by_io_buffer()
91 head->users--; in tomoyo_name_used_by_io_buffer()
109 container_of(element, typeof(*ptr), head.list); in tomoyo_del_transition_control()
124 container_of(element, typeof(*ptr), head.list); in tomoyo_del_aggregator()
139 container_of(element, typeof(*ptr), head.list); in tomoyo_del_manager()
159 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
166 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
174 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
182 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
192 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
202 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
210 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
219 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
227 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
271 head.list); in tomoyo_del_condition()
322 container_of(element, typeof(*member), head.list); in tomoyo_del_path_group()
336 container_of(element, typeof(*group), head.list); in tomoyo_del_group()
427 head.list)->entry.name)) in tomoyo_try_to_gc()
560 list_for_each_entry_safe(group, tmp, list, head.list) { in tomoyo_collect_entry()
563 atomic_read(&group->head.users) > 0) in tomoyo_collect_entry()
565 atomic_set(&group->head.users, in tomoyo_collect_entry()
568 &group->head.list); in tomoyo_collect_entry()
601 struct tomoyo_io_buffer *head; in tomoyo_gc_thread() local
605 list_for_each_entry_safe(head, tmp, &tomoyo_io_buffer_list, in tomoyo_gc_thread()
607 if (head->users) in tomoyo_gc_thread()
609 list_del(&head->list); in tomoyo_gc_thread()
610 kfree(head->read_buf); in tomoyo_gc_thread()
611 kfree(head->write_buf); in tomoyo_gc_thread()
612 kfree(head); in tomoyo_gc_thread()
630 void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register) in tomoyo_notify_gc() argument
636 head->users = 1; in tomoyo_notify_gc()
637 list_add(&head->list, &tomoyo_io_buffer_list); in tomoyo_notify_gc()
639 is_write = head->write_buf != NULL; in tomoyo_notify_gc()
640 if (!--head->users) { in tomoyo_notify_gc()
641 list_del(&head->list); in tomoyo_notify_gc()
642 kfree(head->read_buf); in tomoyo_notify_gc()
643 kfree(head->write_buf); in tomoyo_notify_gc()
644 kfree(head); in tomoyo_notify_gc()