Lines Matching refs:re
117 struct root_entry *re) in insert_root_entry() argument
126 if (entry->root_objectid > re->root_objectid) in insert_root_entry()
128 else if (entry->root_objectid < re->root_objectid) in insert_root_entry()
134 rb_link_node(&re->node, parent_node, p); in insert_root_entry()
135 rb_insert_color(&re->node, root); in insert_root_entry()
234 struct root_entry *re; in free_block_entry() local
240 re = rb_entry(n, struct root_entry, node); in free_block_entry()
241 rb_erase(&re->node, &be->roots); in free_block_entry()
242 kfree(re); in free_block_entry()
265 struct root_entry *re = NULL; in add_block_entry() local
267 re = kzalloc(sizeof(struct root_entry), GFP_KERNEL); in add_block_entry()
269 if (!be || !re) { in add_block_entry()
270 kfree(re); in add_block_entry()
277 re->root_objectid = root_objectid; in add_block_entry()
278 re->num_refs = 0; in add_block_entry()
286 exist_re = insert_root_entry(&exist->roots, re); in add_block_entry()
288 kfree(re); in add_block_entry()
301 insert_root_entry(&be->roots, re); in add_block_entry()
303 kfree(re); in add_block_entry()
311 struct root_entry *re; in add_tree_block() local
338 re = lookup_root_entry(&be->roots, ref_root); in add_tree_block()
339 ASSERT(re); in add_tree_block()
340 re->num_refs++; in add_tree_block()
388 struct root_entry *re; in add_extent_data_ref() local
416 re = lookup_root_entry(&be->roots, ref_root); in add_extent_data_ref()
417 if (!re) { in add_extent_data_ref()
422 re->num_refs += num_refs; in add_extent_data_ref()
634 struct root_entry *re; in dump_block_entry() local
652 re = rb_entry(n, struct root_entry, node); in dump_block_entry()
654 re->root_objectid, re->num_refs); in dump_block_entry()
675 struct root_entry *re = NULL; in btrfs_ref_tree_mod() local
775 re = kmalloc(sizeof(struct root_entry), GFP_NOFS); in btrfs_ref_tree_mod()
776 if (!re) { in btrfs_ref_tree_mod()
788 re->root_objectid = generic_ref->real_root; in btrfs_ref_tree_mod()
789 re->num_refs = 0; in btrfs_ref_tree_mod()
806 tmp = insert_root_entry(&be->roots, re); in btrfs_ref_tree_mod()
808 kfree(re); in btrfs_ref_tree_mod()
809 re = tmp; in btrfs_ref_tree_mod()
852 if (!parent && !re) { in btrfs_ref_tree_mod()
853 re = lookup_root_entry(&be->roots, ref_root); in btrfs_ref_tree_mod()
854 if (!re) { in btrfs_ref_tree_mod()
870 if (re) in btrfs_ref_tree_mod()
871 re->num_refs--; in btrfs_ref_tree_mod()
875 if (re) in btrfs_ref_tree_mod()
876 re->num_refs++; in btrfs_ref_tree_mod()