Lines Matching refs:head

42 	struct tomoyo_io_buffer *head;  in tomoyo_struct_used_by_io_buffer()  local
46 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_struct_used_by_io_buffer()
47 head->users++; in tomoyo_struct_used_by_io_buffer()
49 mutex_lock(&head->io_sem); in tomoyo_struct_used_by_io_buffer()
50 if (head->r.domain == element || head->r.group == element || in tomoyo_struct_used_by_io_buffer()
51 head->r.acl == element || &head->w.domain->list == element) in tomoyo_struct_used_by_io_buffer()
53 mutex_unlock(&head->io_sem); in tomoyo_struct_used_by_io_buffer()
55 head->users--; in tomoyo_struct_used_by_io_buffer()
73 struct tomoyo_io_buffer *head; in tomoyo_name_used_by_io_buffer() local
78 list_for_each_entry(head, &tomoyo_io_buffer_list, list) { in tomoyo_name_used_by_io_buffer()
81 head->users++; in tomoyo_name_used_by_io_buffer()
83 mutex_lock(&head->io_sem); in tomoyo_name_used_by_io_buffer()
85 const char *w = head->r.w[i]; in tomoyo_name_used_by_io_buffer()
92 mutex_unlock(&head->io_sem); in tomoyo_name_used_by_io_buffer()
94 head->users--; in tomoyo_name_used_by_io_buffer()
112 container_of(element, typeof(*ptr), head.list); in tomoyo_del_transition_control()
128 container_of(element, typeof(*ptr), head.list); in tomoyo_del_aggregator()
144 container_of(element, typeof(*ptr), head.list); in tomoyo_del_manager()
166 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
173 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
181 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
189 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
199 = container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
209 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
217 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
226 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
234 container_of(acl, typeof(*entry), head); in tomoyo_del_acl()
280 head.list); in tomoyo_del_condition()
332 container_of(element, typeof(*member), head.list); in tomoyo_del_path_group()
347 container_of(element, typeof(*group), head.list); in tomoyo_del_group()
439 head.list)->entry.name)) in tomoyo_try_to_gc()
578 list_for_each_entry_safe(group, tmp, list, head.list) { in tomoyo_collect_entry()
581 atomic_read(&group->head.users) > 0) in tomoyo_collect_entry()
583 atomic_set(&group->head.users, in tomoyo_collect_entry()
586 &group->head.list); in tomoyo_collect_entry()
621 struct tomoyo_io_buffer *head; in tomoyo_gc_thread() local
625 list_for_each_entry_safe(head, tmp, &tomoyo_io_buffer_list, in tomoyo_gc_thread()
627 if (head->users) in tomoyo_gc_thread()
629 list_del(&head->list); in tomoyo_gc_thread()
630 kfree(head->read_buf); in tomoyo_gc_thread()
631 kfree(head->write_buf); in tomoyo_gc_thread()
632 kfree(head); in tomoyo_gc_thread()
650 void tomoyo_notify_gc(struct tomoyo_io_buffer *head, const bool is_register) in tomoyo_notify_gc() argument
656 head->users = 1; in tomoyo_notify_gc()
657 list_add(&head->list, &tomoyo_io_buffer_list); in tomoyo_notify_gc()
659 is_write = head->write_buf != NULL; in tomoyo_notify_gc()
660 if (!--head->users) { in tomoyo_notify_gc()
661 list_del(&head->list); in tomoyo_notify_gc()
662 kfree(head->read_buf); in tomoyo_notify_gc()
663 kfree(head->write_buf); in tomoyo_notify_gc()
664 kfree(head); in tomoyo_notify_gc()