summaryrefslogtreecommitdiff
path: root/cmds-check.c
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@gnu.org>2014-09-23 17:49:58 +0200
committerDavid Sterba <dsterba@suse.cz>2014-10-10 18:11:32 +0200
commitca1e04597ada5b767cf883e59eb7e79196ae8487 (patch)
tree8a0335f8041edaa0c43999a4360be1258bb92989 /cmds-check.c
parented1b086a3042c25655233ece41ff97b8ecc73a35 (diff)
downloadbtrfs-progs-ca1e04597ada5b767cf883e59eb7e79196ae8487.tar.gz
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 <oliva@gnu.org> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-check.c')
-rw-r--r--cmds-check.c1
1 files changed, 1 insertions, 0 deletions
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;