Lines Matching refs:tm_list
287 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_insert_move() local
295 tm_list = kcalloc(nr_items, sizeof(struct tree_mod_elem *), GFP_NOFS); in btrfs_tree_mod_log_insert_move()
296 if (!tm_list) { in btrfs_tree_mod_log_insert_move()
309 tm_list[i] = alloc_tree_mod_elem(eb, i + dst_slot, in btrfs_tree_mod_log_insert_move()
311 if (!tm_list[i]) { in btrfs_tree_mod_log_insert_move()
341 ret = tree_mod_log_insert(eb->fs_info, tm_list[i]); in btrfs_tree_mod_log_insert_move()
350 kfree(tm_list); in btrfs_tree_mod_log_insert_move()
355 if (tm_list) { in btrfs_tree_mod_log_insert_move()
357 if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node)) in btrfs_tree_mod_log_insert_move()
358 rb_erase(&tm_list[i]->node, &eb->fs_info->tree_mod_log); in btrfs_tree_mod_log_insert_move()
359 kfree(tm_list[i]); in btrfs_tree_mod_log_insert_move()
364 kfree(tm_list); in btrfs_tree_mod_log_insert_move()
371 struct tree_mod_elem **tm_list, in tree_mod_log_free_eb() argument
378 ret = tree_mod_log_insert(fs_info, tm_list[i]); in tree_mod_log_free_eb()
381 rb_erase(&tm_list[j]->node, in tree_mod_log_free_eb()
396 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_insert_root() local
406 tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *), in btrfs_tree_mod_log_insert_root()
408 if (!tm_list) { in btrfs_tree_mod_log_insert_root()
413 tm_list[i] = alloc_tree_mod_elem(old_root, i, in btrfs_tree_mod_log_insert_root()
415 if (!tm_list[i]) { in btrfs_tree_mod_log_insert_root()
450 if (tm_list) in btrfs_tree_mod_log_insert_root()
451 ret = tree_mod_log_free_eb(fs_info, tm_list, nritems); in btrfs_tree_mod_log_insert_root()
459 kfree(tm_list); in btrfs_tree_mod_log_insert_root()
464 if (tm_list) { in btrfs_tree_mod_log_insert_root()
466 kfree(tm_list[i]); in btrfs_tree_mod_log_insert_root()
467 kfree(tm_list); in btrfs_tree_mod_log_insert_root()
546 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_eb_copy() local
562 tm_list = kcalloc(nr_items * 2, sizeof(struct tree_mod_elem *), in btrfs_tree_mod_log_eb_copy()
564 if (!tm_list) { in btrfs_tree_mod_log_eb_copy()
589 tm_list_add = tm_list; in btrfs_tree_mod_log_eb_copy()
590 tm_list_rem = tm_list + nr_items; in btrfs_tree_mod_log_eb_copy()
645 kfree(tm_list); in btrfs_tree_mod_log_eb_copy()
656 if (tm_list) { in btrfs_tree_mod_log_eb_copy()
658 if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node)) in btrfs_tree_mod_log_eb_copy()
659 rb_erase(&tm_list[i]->node, &fs_info->tree_mod_log); in btrfs_tree_mod_log_eb_copy()
660 kfree(tm_list[i]); in btrfs_tree_mod_log_eb_copy()
665 kfree(tm_list); in btrfs_tree_mod_log_eb_copy()
672 struct tree_mod_elem **tm_list = NULL; in btrfs_tree_mod_log_free_eb() local
681 tm_list = kcalloc(nritems, sizeof(struct tree_mod_elem *), GFP_NOFS); in btrfs_tree_mod_log_free_eb()
682 if (!tm_list) { in btrfs_tree_mod_log_free_eb()
688 tm_list[i] = alloc_tree_mod_elem(eb, i, in btrfs_tree_mod_log_free_eb()
690 if (!tm_list[i]) { in btrfs_tree_mod_log_free_eb()
712 ret = tree_mod_log_free_eb(eb->fs_info, tm_list, nritems); in btrfs_tree_mod_log_free_eb()
717 kfree(tm_list); in btrfs_tree_mod_log_free_eb()
722 if (tm_list) { in btrfs_tree_mod_log_free_eb()
724 kfree(tm_list[i]); in btrfs_tree_mod_log_free_eb()
725 kfree(tm_list); in btrfs_tree_mod_log_free_eb()