diff options
author | Theodore Ts'o <tytso@mit.edu> | 2014-07-22 14:48:41 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-07-22 14:48:41 -0400 |
commit | 7722961d2c4c327d45b9c42dd29e8231cc0e1c4b (patch) | |
tree | 7e7006954aced946578226f54a7dd8b4217d2e99 | |
parent | 27a129f3c20a2c785741a2001532a78f49445be9 (diff) | |
download | e2fsprogs-7722961d2c4c327d45b9c42dd29e8231cc0e1c4b.tar.gz |
e2fsck: check error return from ext2fs_extent_fix_parents in pass 1
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | e2fsck/pass1.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index e714b0f4..1269a12c 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -1843,7 +1843,12 @@ report_problem: pctx->str = "ext2fs_extent_delete"; return; } - ext2fs_extent_fix_parents(ehandle); + pctx->errcode = ext2fs_extent_fix_parents(ehandle); + if (pctx->errcode && + pctx->errcode != EXT2_ET_NO_CURRENT_NODE) { + pctx->str = "ext2fs_extent_fix_parents"; + return; + } pctx->errcode = ext2fs_extent_get(ehandle, EXT2_EXTENT_CURRENT, &extent); @@ -1878,8 +1883,14 @@ report_problem: pctx->blk2 = extent.e_lblk; pctx->num = e_info.curr_level - 1; problem = PR_1_EXTENT_INDEX_START_INVALID; - if (fix_problem(ctx, problem, pctx)) - ext2fs_extent_fix_parents(ehandle); + if (fix_problem(ctx, problem, pctx)) { + pctx->errcode = + ext2fs_extent_fix_parents(ehandle); + if (pctx->errcode) { + pctx->str = "ext2fs_extent_fix_parents"; + return; + } + } } scan_extent_node(ctx, pctx, pb, extent.e_lblk, last_lblk, eof_block, ehandle); |