From: Darrick J. Wong Date: Fri, 14 Mar 2014 13:26:21 +0000 (-0400) Subject: e2fsck: zero errcode when checking inline data blocks X-Git-Tag: v1.43-WIP-2015-05-18~312 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cc7d12ac377458e17b520e431f5b54896be3e456;p=tools%2Fe2fsprogs.git e2fsck: zero errcode when checking inline data blocks When checking inline data blocks, always zero pctx->errcode because otherwise a previous error condition could leak through and "cause" a fatal block iteration failure. I found this by corrupting an xattr block on an inline_data inode and fsck aborted when I tried to repair it. Signed-off-by: Darrick J. Wong Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 11b3dde..641b3fb 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2158,8 +2158,10 @@ static void check_blocks_extents(e2fsck_t ctx, struct problem_context *pctx, static void check_blocks_inline_data(e2fsck_t ctx, struct problem_context *pctx, struct process_block_struct *pb) { - if (!pb->is_dir) + if (!pb->is_dir) { + pctx->errcode = 0; return; + } pctx->errcode = ext2fs_add_dir_block2(ctx->fs->dblist, pb->ino, 0, 0); if (pctx->errcode) {