Skip to contentSkip to conversation

Btrfs: fix wrong leaf when checking the trees relationship

PATCH New Miao Xie 1 participant 1 message Aug 10, 2012 Btrfs file system

lore
Share & tools
lore

Miao Xie

author
#0 lore raw

PATCH 2/2 Btrfs: 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.

---
 btrfsck.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
btrfsck.c +1 -0
index 088b9f4..bb1aa76 100644
@@ -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]);
Signature · 1 line
1.7.6.5