fix_problem(ctx, PR_5_PASS_HEADER, &pctx);
if (ctx->progress)
- (ctx->progress)(ctx, 5, 0, 3);
+ if ((ctx->progress)(ctx, 5, 0, 3))
+ return;
e2fsck_read_bitmaps(ctx);
if (ctx->progress)
- (ctx->progress)(ctx, 5, 2, 3);
+ if ((ctx->progress)(ctx, 5, 2, 3))
+ return;
check_block_bitmaps(ctx);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return;
check_inode_bitmaps(ctx);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return;
check_inode_end(ctx);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return;
check_block_end(ctx);
- if (ctx->flags & E2F_FLAG_ABORT)
+ if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
return;
if (ctx->progress)
- (ctx->progress)(ctx, 5, 3, 3);
+ if ((ctx->progress)(ctx, 5, 3, 3))
+ return;
ext2fs_free_inode_bitmap(ctx->inode_used_map);
ctx->inode_used_map = 0;
int group_free = 0;
int actual, bitmap;
struct problem_context pctx;
- int problem, fixit;
+ int problem, fixit, had_problem;
errcode_t retval;
clear_problem_context(&pctx);
return;
}
-redo_counts:
+redo_counts:
+ had_problem = 0;
for (i = fs->super->s_first_data_block;
i < fs->super->s_blocks_count;
i++) {
}
pctx.blk = i;
fix_problem(ctx, problem, &pctx);
+ had_problem++;
do_counts:
if (!bitmap) {
group_free = 0;
}
}
- fixit = end_problem_latch(ctx, PR_LATCH_BBITMAP);
+ if (had_problem)
+ fixit = end_problem_latch(ctx, PR_LATCH_BBITMAP);
+ else
+ fixit = -1;
if (fixit == 1) {
ext2fs_free_block_bitmap(fs->block_map);
retval = ext2fs_copy_bitmap(ctx->block_found_map,
int actual, bitmap;
errcode_t retval;
struct problem_context pctx;
- int problem, fixit;
+ int problem, fixit, had_problem;
clear_problem_context(&pctx);
free_array = (int *) e2fsck_allocate_memory(ctx,
}
redo_counts:
+ had_problem = 0;
for (i = 1; i <= fs->super->s_inodes_count; i++) {
actual = ext2fs_fast_test_inode_bitmap(ctx->inode_used_map, i);
bitmap = ext2fs_fast_test_inode_bitmap(fs->inode_map, i);
}
pctx.ino = i;
fix_problem(ctx, problem, &pctx);
+ had_problem++;
do_counts:
if (!bitmap) {
dirs_count = 0;
}
}
- fixit = end_problem_latch(ctx, PR_LATCH_IBITMAP);
+ if (had_problem)
+ fixit = end_problem_latch(ctx, PR_LATCH_IBITMAP);
+ else
+ fixit = -1;
if (fixit == 1) {
ext2fs_free_inode_bitmap(fs->inode_map);
retval = ext2fs_copy_bitmap(ctx->inode_used_map,