Lines Matching defs:root
43 radix_max(struct radix_tree_root *root)
45 return (1 << (root->height * RADIX_TREE_MAP_SHIFT)) - 1;
55 radix_tree_lookup(struct radix_tree_root *root, unsigned long index)
62 node = root->rnode;
63 height = root->height - 1;
64 if (index > radix_max(root))
76 radix_tree_delete(struct radix_tree_root *root, unsigned long index)
85 node = root->rnode;
86 height = root->height - 1;
87 if (index > radix_max(root))
109 if (node == root->rnode) {
110 root->rnode = NULL;
111 root->height = 0;
123 radix_tree_insert(struct radix_tree_root *root, unsigned long index, void *item)
132 while (root->rnode == NULL || radix_max(root) < index) {
133 node = malloc(sizeof(*node), M_RADIX, root->gfp_mask | M_ZERO);
136 node->slots[0] = root->rnode;
137 if (root->rnode)
139 root->rnode = node;
140 root->height++;
142 node = root->rnode;
143 height = root->height - 1;
152 root->gfp_mask | M_ZERO);