From ca1e04597ada5b767cf883e59eb7e79196ae8487 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 23 Sep 2014 17:49:58 +0200 Subject: [PATCH] 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 --- cmds-check.c | 1 + 1 file changed, 1 insertion(+) 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) break;