/* Return value is the same as btrfs_find_root_search(). */
static int add_eb_to_result(struct extent_buffer *eb,
struct cache_tree *result,
/* Return value is the same as btrfs_find_root_search(). */
static int add_eb_to_result(struct extent_buffer *eb,
struct cache_tree *result,
struct btrfs_find_root_filter *filter,
struct cache_extent **match)
{
struct btrfs_find_root_filter *filter,
struct cache_extent **match)
{
/* Same level, insert it into the eb_tree */
if (level == gen_cache->highest_level) {
ret = add_cache_extent(&gen_cache->eb_tree,
/* Same level, insert it into the eb_tree */
if (level == gen_cache->highest_level) {
ret = add_cache_extent(&gen_cache->eb_tree,
- offset += leafsize) {
- eb = read_tree_block_fs_info(fs_info, offset, leafsize,
- 0);
+ offset += nodesize) {
+ eb = read_tree_block(fs_info, offset, 0);
- ret = add_eb_to_result(eb, result, leafsize, filter,
+ ret = add_eb_to_result(eb, result, nodesize, filter,