Lines Matching refs:item
11 struct item *
17 struct item *
28 struct item *item_create(unsigned long index, unsigned int order) in item_create()
30 struct item *ret = malloc(sizeof(*ret)); in item_create()
39 struct item *item = item_create(index, 0); in item_insert() local
40 int err = radix_tree_insert(root, item->index, item); in item_insert()
42 free(item); in item_insert()
46 void item_sanity(struct item *item, unsigned long index) in item_sanity() argument
49 assert(!radix_tree_is_internal_node(item)); in item_sanity()
50 assert(item->order < BITS_PER_LONG); in item_sanity()
51 mask = (1UL << item->order) - 1; in item_sanity()
52 assert((item->index | mask) == (index | mask)); in item_sanity()
55 void item_free(struct item *item, unsigned long index) in item_free() argument
57 item_sanity(item, index); in item_free()
58 free(item); in item_free()
63 struct item *item = radix_tree_delete(root, index); in item_delete() local
65 if (!item) in item_delete()
68 item_free(item, index); in item_delete()
74 struct item *item = container_of(head, struct item, rcu_head); in item_free_rcu() local
76 free(item); in item_free_rcu()
81 struct item *item = xa_erase(xa, index); in item_delete_rcu() local
83 if (item) { in item_delete_rcu()
84 item_sanity(item, index); in item_delete_rcu()
85 call_rcu(&item->rcu_head, item_free_rcu); in item_delete_rcu()
93 struct item *item; in item_check_present() local
95 item = radix_tree_lookup(root, index); in item_check_present()
96 assert(item != NULL); in item_check_present()
97 item_sanity(item, index); in item_check_present()
100 struct item *item_lookup(struct radix_tree_root *root, unsigned long index) in item_lookup()
107 struct item *item; in item_check_absent() local
109 item = radix_tree_lookup(root, index); in item_check_absent()
110 assert(item == NULL); in item_check_absent()
120 struct item *items[chunk]; in item_gang_check_present()
146 struct item *items[chunk]; in item_full_scan()
178 struct item *item; in tag_tagged_items() local
184 xas_for_each_marked(&xas, item, end, iftag) { in tag_tagged_items()