Lines Matching refs:tm_list
286 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_insert_move() local
294 tm_list = kcalloc(nr_items, sizeof(struct tree_mod_elem *), GFP_NOFS); in btrfs_tree_mod_log_insert_move()
295 if (!tm_list) { in btrfs_tree_mod_log_insert_move()
308 tm_list[i] = alloc_tree_mod_elem(eb, i + dst_slot, in btrfs_tree_mod_log_insert_move()
310 if (!tm_list[i]) { in btrfs_tree_mod_log_insert_move()
340 ret = tree_mod_log_insert(eb->fs_info, tm_list[i]); in btrfs_tree_mod_log_insert_move()
349 kfree(tm_list); in btrfs_tree_mod_log_insert_move()
354 if (tm_list) { in btrfs_tree_mod_log_insert_move()
356 if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node)) in btrfs_tree_mod_log_insert_move()
357 rb_erase(&tm_list[i]->node, &eb->fs_info->tree_mod_log); in btrfs_tree_mod_log_insert_move()
358 kfree(tm_list[i]); in btrfs_tree_mod_log_insert_move()
363 kfree(tm_list); in btrfs_tree_mod_log_insert_move()
370 struct tree_mod_elem **tm_list, in tree_mod_log_free_eb() argument
377 ret = tree_mod_log_insert(fs_info, tm_list[i]); in tree_mod_log_free_eb()
380 rb_erase(&tm_list[j]->node, in tree_mod_log_free_eb()
395 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_insert_root() local
405 tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *), in btrfs_tree_mod_log_insert_root()
407 if (!tm_list) { in btrfs_tree_mod_log_insert_root()
412 tm_list[i] = alloc_tree_mod_elem(old_root, i, in btrfs_tree_mod_log_insert_root()
414 if (!tm_list[i]) { in btrfs_tree_mod_log_insert_root()
449 if (tm_list) in btrfs_tree_mod_log_insert_root()
450 ret = tree_mod_log_free_eb(fs_info, tm_list, nritems); in btrfs_tree_mod_log_insert_root()
458 kfree(tm_list); in btrfs_tree_mod_log_insert_root()
463 if (tm_list) { in btrfs_tree_mod_log_insert_root()
465 kfree(tm_list[i]); in btrfs_tree_mod_log_insert_root()
466 kfree(tm_list); in btrfs_tree_mod_log_insert_root()
545 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_eb_copy() local
561 tm_list = kcalloc(nr_items * 2, sizeof(struct tree_mod_elem *), in btrfs_tree_mod_log_eb_copy()
563 if (!tm_list) { in btrfs_tree_mod_log_eb_copy()
588 tm_list_add = tm_list; in btrfs_tree_mod_log_eb_copy()
589 tm_list_rem = tm_list + nr_items; in btrfs_tree_mod_log_eb_copy()
644 kfree(tm_list); in btrfs_tree_mod_log_eb_copy()
655 if (tm_list) { in btrfs_tree_mod_log_eb_copy()
657 if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node)) in btrfs_tree_mod_log_eb_copy()
658 rb_erase(&tm_list[i]->node, &fs_info->tree_mod_log); in btrfs_tree_mod_log_eb_copy()
659 kfree(tm_list[i]); in btrfs_tree_mod_log_eb_copy()
664 kfree(tm_list); in btrfs_tree_mod_log_eb_copy()
671 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_free_eb() local
680 tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *), GFP_NOFS); in btrfs_tree_mod_log_free_eb()
681 if (!tm_list) { in btrfs_tree_mod_log_free_eb()
687 tm_list[i] = alloc_tree_mod_elem(eb, i, in btrfs_tree_mod_log_free_eb()
689 if (!tm_list[i]) { in btrfs_tree_mod_log_free_eb()
711 ret = tree_mod_log_free_eb(eb->fs_info, tm_list, nritems); in btrfs_tree_mod_log_free_eb()
716 kfree(tm_list); in btrfs_tree_mod_log_free_eb()
721 if (tm_list) { in btrfs_tree_mod_log_free_eb()
723 kfree(tm_list[i]); in btrfs_tree_mod_log_free_eb()
724 kfree(tm_list); in btrfs_tree_mod_log_free_eb()