From: Alexandre Oliva Date: Tue, 23 Sep 2014 15:49:58 +0000 (+0200) Subject: btrfs-progs: repair: remove recowed entry from the to-recow list X-Git-Tag: upstream/4.16.1~2663 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca1e04597ada5b767cf883e59eb7e79196ae8487;p=platform%2Fupstream%2Fbtrfs-progs.git 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 --- diff --git a/cmds-check.c b/cmds-check.c index c0a9870..7a86077 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;