Lines Matching refs:head
23 static struct btrfs_lru_cache_entry *match_entry(struct list_head *head, u64 key,
28 list_for_each_entry(entry, head, list) {
48 struct list_head *head;
51 head = mtree_load(&cache->entries, key);
52 if (!head)
55 entry = match_entry(head, key, gen);
82 struct list_head *head;
86 * means it's a head entry not pointing to any cached entries,
89 head = mtree_erase(&cache->entries, entry->key);
90 ASSERT(head == prev);
91 kfree(head);
111 struct list_head *head;
114 head = kmalloc(sizeof(*head), gfp);
115 if (!head)
118 ret = mtree_insert(&cache->entries, key, head, gfp);
120 INIT_LIST_HEAD(head);
121 list_add_tail(&new_entry->list, head);
123 kfree(head);
124 head = mtree_load(&cache->entries, key);
125 ASSERT(head != NULL);
126 if (match_entry(head, key, new_entry->gen) != NULL)
128 list_add_tail(&new_entry->list, head);
130 kfree(head);