Lines Matching full:re

63  * free it until we unmount the file system in order to make sure re-allocations
120 struct root_entry *re) in insert_root_entry() argument
129 if (entry->root_objectid > re->root_objectid) in insert_root_entry()
131 else if (entry->root_objectid < re->root_objectid) in insert_root_entry()
137 rb_link_node(&re->node, parent_node, p); in insert_root_entry()
138 rb_insert_color(&re->node, root); in insert_root_entry()
237 struct root_entry *re; in free_block_entry() local
243 re = rb_entry(n, struct root_entry, node); in free_block_entry()
244 rb_erase(&re->node, &be->roots); in free_block_entry()
245 kfree(re); in free_block_entry()
268 struct root_entry *re = NULL; in add_block_entry() local
270 re = kzalloc(sizeof(struct root_entry), GFP_NOFS); in add_block_entry()
272 if (!be || !re) { in add_block_entry()
273 kfree(re); in add_block_entry()
280 re->root_objectid = root_objectid; in add_block_entry()
281 re->num_refs = 0; in add_block_entry()
289 exist_re = insert_root_entry(&exist->roots, re); in add_block_entry()
291 kfree(re); in add_block_entry()
293 kfree(re); in add_block_entry()
306 insert_root_entry(&be->roots, re); in add_block_entry()
308 kfree(re); in add_block_entry()
316 struct root_entry *re; in add_tree_block() local
343 re = lookup_root_entry(&be->roots, ref_root); in add_tree_block()
344 ASSERT(re); in add_tree_block()
345 re->num_refs++; in add_tree_block()
393 struct root_entry *re; in add_extent_data_ref() local
421 re = lookup_root_entry(&be->roots, ref_root); in add_extent_data_ref()
422 if (!re) { in add_extent_data_ref()
427 re->num_refs += num_refs; in add_extent_data_ref()
635 struct root_entry *re; in dump_block_entry() local
653 re = rb_entry(n, struct root_entry, node); in dump_block_entry()
655 re->root_objectid, re->num_refs); in dump_block_entry()
676 struct root_entry *re = NULL; in btrfs_ref_tree_mod() local
756 "re-allocated a block that still has references to it!"); in btrfs_ref_tree_mod()
776 re = kmalloc(sizeof(struct root_entry), GFP_NOFS); in btrfs_ref_tree_mod()
777 if (!re) { in btrfs_ref_tree_mod()
786 * re->num_refs. in btrfs_ref_tree_mod()
789 re->root_objectid = generic_ref->real_root; in btrfs_ref_tree_mod()
790 re->num_refs = 0; in btrfs_ref_tree_mod()
802 kfree(re); in btrfs_ref_tree_mod()
812 kfree(re); in btrfs_ref_tree_mod()
817 tmp = insert_root_entry(&be->roots, re); in btrfs_ref_tree_mod()
819 kfree(re); in btrfs_ref_tree_mod()
820 re = tmp; in btrfs_ref_tree_mod()
866 if (!parent && !re) { in btrfs_ref_tree_mod()
867 re = lookup_root_entry(&be->roots, ref_root); in btrfs_ref_tree_mod()
868 if (!re) { in btrfs_ref_tree_mod()
870 * This shouldn't happen because we will add our re in btrfs_ref_tree_mod()
884 if (re) in btrfs_ref_tree_mod()
885 re->num_refs--; in btrfs_ref_tree_mod()
889 if (re) in btrfs_ref_tree_mod()
890 re->num_refs++; in btrfs_ref_tree_mod()