diff --git a/disk-io.c b/disk-io.c index e4550bd4..e840177f 100644 --- a/disk-io.c +++ b/disk-io.c @@ -683,6 +683,7 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, struct btrfs_root *root; struct rb_node *node; int ret; + u64 objectid = location->objectid; if (location->objectid == BTRFS_ROOT_TREE_OBJECTID) return fs_info->tree_root; @@ -698,7 +699,7 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, BUG_ON(location->objectid == BTRFS_TREE_RELOC_OBJECTID || location->offset != (u64)-1); - node = rb_search(&fs_info->fs_root_tree, (void *)&location->objectid, + node = rb_search(&fs_info->fs_root_tree, (void *)&objectid, btrfs_fs_roots_compare_objectids, NULL); if (node) return container_of(node, struct btrfs_root, rb_node);