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>
This commit is contained in:
Gui Hecheng 2014-08-28 10:25:54 +08:00 committed by David Sterba
parent c7d16e08bd
commit 24f5a651d9

View File

@ -191,6 +191,7 @@ again:
level++;
if (level == BTRFS_MAX_LEVEL)
return 1;
offset = 1;
continue;
}