Btrfs-progs: fix wrong return value of check_owner_ref()

If we find the block by seach corresponding fs tree, we should return 0,
and tell the caller we pass the check.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
This commit is contained in:
Miao Xie 2012-08-21 14:16:27 +08:00 committed by root
parent f3f72863d5
commit 50dcf9a5b4

View File

@ -1954,7 +1954,7 @@ static int check_owner_ref(struct btrfs_root *root,
if (buf->start == btrfs_node_blockptr(path.nodes[level + 1],
path.slots[level + 1]))
rec->owner_ref_checked = 1;
found = 1;
btrfs_release_path(ref_root, &path);
return found ? 0 : 1;