summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmds-restore.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index 2f9b72d3..859deaf3 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -967,8 +967,9 @@ static int do_list_roots(struct btrfs_root *root)
return -1;
}
+ leaf = path->nodes[0];
+
while (1) {
- leaf = path->nodes[0];
slot = path->slots[0];
if (slot >= btrfs_header_nritems(leaf)) {
ret = btrfs_next_leaf(root, path);