From 73e5abcfe43d6bbd5b4793769d41d097ba7aed84 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 28 May 2008 04:54:44 -0400 Subject: [PATCH] e2fsck: Don't skip an extent after deleting an invalid extent ext2fs_delete_extent() deletes the current extent and moves to the next extent (if present). So we need to skip moving to the next extent and get the (new) current extent and check it before moving on. Signed-off-by: "Theodore Ts'o" --- e2fsck/pass1.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index c729ea3b0..5ca2d83b7 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -1654,6 +1654,14 @@ static void scan_extent_node(e2fsck_t ctx, struct problem_context *pctx, ctx->flags |= E2F_FLAG_ABORT; return; } + pctx->errcode = ext2fs_extent_get(ehandle, + EXT2_EXTENT_CURRENT, + &extent); + if (pctx->errcode == EXT2_ET_NO_CURRENT_NODE) { + pctx->errcode = 0; + break; + } + continue; } goto next; } -- 2.47.2