summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2014-08-28 10:25:54 +0800
committerDavid Sterba <dsterba@suse.cz>2014-09-14 14:50:54 +0200
commit24f5a651d94678746dc8a72f28d49c36e33051e7 (patch)
treed6f0a2c1fe3b502976b131c98808b915b05cb90e /cmds-restore.c
parentc7d16e08bdca950f615c4103dd1a4d8d7f810ab1 (diff)
btrfs-progs: fix next_leaf in restore as it improperly skips some slots
When entering the next level node, the @next_leaf in restore forgets to start at the first slot. Just reset it to the first one. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
-rw-r--r--cmds-restore.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-restore.c b/cmds-restore.c
index bc67708c..f909429b 100644
--- a/cmds-restore.c
+++ b/cmds-restore.c
@@ -191,6 +191,7 @@ again:
level++;
if (level == BTRFS_MAX_LEVEL)
return 1;
+ offset = 1;
continue;
}