diff mbox

[2/3] btrfs-progs: fix next_leaf in restore as it improperly skips some slots

Message ID 1409192755-1826-2-git-send-email-guihc.fnst@cn.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Gui Hecheng Aug. 28, 2014, 2:25 a.m. UTC
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>
---
 cmds-restore.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/cmds-restore.c b/cmds-restore.c
index e94592c..918f1fb 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;
 		}