path: root/cmds-check.c
diff options
authorAlexandre Oliva <>2014-09-23 17:49:58 +0200
committerDavid Sterba <>2014-10-10 18:11:32 +0200
commitca1e04597ada5b767cf883e59eb7e79196ae8487 (patch)
tree8a0335f8041edaa0c43999a4360be1258bb92989 /cmds-check.c
parented1b086a3042c25655233ece41ff97b8ecc73a35 (diff)
btrfs-progs: repair: remove recowed entry from the to-recow list
If we attempt to repair a filesystem with metadata blocks that need recowing, we'll get into an infinite loop repeatedly recowing the first entry in the list, without ever removing it from the list. Oops. Fixed. Signed-off-by: Alexandre Oliva <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-check.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/cmds-check.c b/cmds-check.c
index c0a9870e..7a86077d 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -7034,6 +7034,7 @@ int cmd_check(int argc, char **argv)
eb = list_first_entry(&root->fs_info->recow_ebs,
struct extent_buffer, recow);
+ list_del_init(&eb->recow);
ret = recow_extent_buffer(root, eb);
if (ret)