summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2012-08-10 13:12:16 +0800
committerroot <root@localhost.localdomain>2012-10-04 16:26:31 -0400
commit78bffa238788705967050b15c9e6a7e05c90bde5 (patch)
treebf9d3f90b5b7d62b628ab6cef20b94490bf8f6fd
parent3b4e2d61961f7308885cce98bfecdf07d6c0ed01 (diff)
Btrfs-progs: fix wrong leaf when checking the trees relationship
The variant named 'leaf' in is_child_root() still hold old result after we get the next leaf, it make btrfsck returns the wrong result, such as "unresolved ref root ..", fix it. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
-rw-r--r--btrfsck.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/btrfsck.c b/btrfsck.c
index 2e81adcf..f09a4a41 100644
--- a/btrfsck.c
+++ b/btrfsck.c
@@ -786,6 +786,7 @@ static int is_child_root(struct btrfs_root *root, u64 parent_root_id,
if (ret > 0)
break;
+ leaf = path.nodes[0];
}
btrfs_item_key_to_cpu(leaf, &key, path.slots[0]);