Btrfs-progs: add_refs_for_implied: Use root_id instead of root_bytenr.

resolve_one_root() returns the objectid of a tree rather than the logical
address of the root node. Hence using root_bytenr is misleading. Fix this.

Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
master
Chandan Rajendra 2014-11-27 10:26:45 +05:30 committed by David Sterba
parent 8be2fff129
commit 602536773d
1 changed files with 2 additions and 2 deletions

View File

@ -553,11 +553,11 @@ static int add_refs_for_implied(struct btrfs_fs_info *info, u64 bytenr,
struct tree_block *block)
{
int ret;
u64 root_bytenr = resolve_one_root(bytenr);
u64 root_id = resolve_one_root(bytenr);
struct btrfs_root *root;
struct btrfs_key key;
key.objectid = root_bytenr;
key.objectid = root_id;
key.type = BTRFS_ROOT_ITEM_KEY;
key.offset = (u64)-1;