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_NOFS); 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()
290 kfree(re); in add_block_entry()
303 insert_root_entry(&be->roots, re); in add_block_entry()
305 kfree(re); in add_block_entry()
313 struct root_entry *re; in add_tree_block() local
340 re = lookup_root_entry(&be->roots, ref_root); in add_tree_block()
341 ASSERT(re); in add_tree_block()
342 re->num_refs++; in add_tree_block()
390 struct root_entry *re; in add_extent_data_ref() local
418 re = lookup_root_entry(&be->roots, ref_root); in add_extent_data_ref()
419 if (!re) { in add_extent_data_ref()
424 re->num_refs += num_refs; in add_extent_data_ref()
624 struct root_entry *re; in dump_block_entry() local
642 re = rb_entry(n, struct root_entry, node); in dump_block_entry()
644 re->root_objectid, re->num_refs); in dump_block_entry()
665 struct root_entry *re = NULL; in btrfs_ref_tree_mod() local
765 re = kmalloc(sizeof(struct root_entry), GFP_NOFS); in btrfs_ref_tree_mod()
766 if (!re) { in btrfs_ref_tree_mod()
778 re->root_objectid = generic_ref->real_root; in btrfs_ref_tree_mod()
779 re->num_refs = 0; in btrfs_ref_tree_mod()
804 tmp = insert_root_entry(&be->roots, re); in btrfs_ref_tree_mod()
806 kfree(re); in btrfs_ref_tree_mod()
807 re = tmp; in btrfs_ref_tree_mod()
853 if (!parent && !re) { in btrfs_ref_tree_mod()
854 re = lookup_root_entry(&be->roots, ref_root); in btrfs_ref_tree_mod()
855 if (!re) { in btrfs_ref_tree_mod()
871 if (re) in btrfs_ref_tree_mod()
872 re->num_refs--; in btrfs_ref_tree_mod()
876 if (re) in btrfs_ref_tree_mod()
877 re->num_refs++; in btrfs_ref_tree_mod()