summaryrefslogtreecommitdiff
path: root/e2fsck/pass2.c
diff options
context:
space:
mode:
Diffstat (limited to 'e2fsck/pass2.c')
-rw-r--r--e2fsck/pass2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index e4479308..715919d6 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -114,7 +114,13 @@ void e2fsck_pass2(e2fsck_t ctx)
if (!(ctx->options & E2F_OPT_PREEN))
fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx);
- cd.pctx.errcode = ext2fs_create_icount2(fs, EXT2_ICOUNT_OPT_INCREMENT,
+ e2fsck_setup_tdb_icount(ctx, EXT2_ICOUNT_OPT_INCREMENT,
+ &ctx->inode_count);
+ if (ctx->inode_count)
+ cd.pctx.errcode = 0;
+ else
+ cd.pctx.errcode = ext2fs_create_icount2(fs,
+ EXT2_ICOUNT_OPT_INCREMENT,
0, ctx->inode_link_info,
&ctx->inode_count);
if (cd.pctx.errcode) {