From 78bffa238788705967050b15c9e6a7e05c90bde5 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Fri, 10 Aug 2012 13:12:16 +0800 Subject: [PATCH] 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 --- btrfsck.c | 1 + 1 file changed, 1 insertion(+) diff --git a/btrfsck.c b/btrfsck.c index 2e81adc..f09a4a4 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]); -- 2.7.4