Lines Matching defs:node

346  * The struct rtree_node represents one node of the radix tree.
384 struct rtree_node *node;
408 * alloc_rtree_node - Allocate a new node and add it to the radix tree.
411 * leave nodes of the radix tree. It also adds the node to the
417 struct rtree_node *node;
419 node = chain_alloc(ca, sizeof(struct rtree_node));
420 if (!node) {
424 node->data = get_image_page(gfp_mask, safe_needed);
425 if (!node->data) {
429 list_add_tail(&node->list, list);
431 return node;
435 * add_rtree_block - Add a new leave node to the radix tree.
443 struct rtree_node *node, *block, **dst;
458 node = alloc_rtree_node(gfp_mask, safe_needed, ca, &zone->nodes);
459 if (!node) {
463 node->data[0] = (unsigned long)zone->rtree;
464 zone->rtree = node;
475 node = zone->rtree;
481 if (!node) {
482 node = alloc_rtree_node(gfp_mask, safe_needed, ca, &zone->nodes);
483 if (!node) {
486 *dst = node;
492 node = *dst;
542 * Free all node pages of the radix tree. The mem_zone_bm_rtree
548 struct rtree_node *node;
550 list_for_each_entry(node, &zone->nodes, list) free_image_page(node->data, clear_nosave_free);
552 list_for_each_entry(node, &zone->leaves, list) free_image_page(node->data, clear_nosave_free);
558 bm->cur.node = list_entry(bm->cur.zone->leaves.next, struct rtree_node, list);
720 struct rtree_node *node;
746 * We have found the zone. Now walk the radix tree to find the leaf node
752 * pfn falls into the current node then we do not need to walk
755 node = bm->cur.node;
760 node = zone->rtree;
768 BUG_ON(node->data[index] == 0);
769 node = (struct rtree_node *)node->data[index];
775 bm->cur.node = node;
779 *addr = node->data;
826 clear_bit(bit, bm->cur.node->data);
849 * rtree_next_node - Jump to the next leaf node.
851 * Set the position to the beginning of the next node in the
852 * memory bitmap. This is either the next node in the current
853 * zone's radix tree or the first node in the radix tree of the
856 * Return true if there is a next node, false otherwise.
860 if (!list_is_last(&bm->cur.node->list, &bm->cur.zone->leaves)) {
861 bm->cur.node = list_entry(bm->cur.node->list.next, struct rtree_node, list);
871 bm->cur.node = list_entry(bm->cur.zone->leaves.next, struct rtree_node, list);
900 bit = find_next_bit(bm->cur.node->data, bits, bm->cur.node_bit);
925 struct rtree_node *node;
927 list_for_each_entry(node, &zone->nodes, list) recycle_safe_page(node->data);
929 list_for_each_entry(node, &zone->leaves, list) recycle_safe_page(node->data);