diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2014-08-10 18:39:47 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-08-10 18:39:47 -0400 |
commit | 68073429d3c81eebbf502fdc5ff320468e9b0d2c (patch) | |
tree | 6ebefbadf47e252fc216a2b7762971a786d5cfc9 | |
parent | 04af897878f6966396e40e18e2d2f98d52afebb9 (diff) | |
download | android_external_e2fsprogs-68073429d3c81eebbf502fdc5ff320468e9b0d2c.tar.gz android_external_e2fsprogs-68073429d3c81eebbf502fdc5ff320468e9b0d2c.tar.bz2 android_external_e2fsprogs-68073429d3c81eebbf502fdc5ff320468e9b0d2c.zip |
e2fsck: check inline directory data "block" first
Since the inline data flag will cause the extent/block map iteration
code to abort fsck early, move the test for the inode flag and the
actual block check call further forward in check_blocks. This
eliminates an e2fsck abort on an inline data symlink when the file ACL
block is set.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | e2fsck/pass1.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 74eed4e4..41441b62 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2620,7 +2620,9 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx, pb.num_blocks++; } - if (ext2fs_inode_has_valid_blocks2(fs, inode)) { + if (inlinedata_fs && (inode->i_flags & EXT4_INLINE_DATA_FL)) + check_blocks_inline_data(ctx, pctx, &pb); + else if (ext2fs_inode_has_valid_blocks2(fs, inode)) { if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) check_blocks_extents(ctx, pctx, &pb); else { @@ -2656,10 +2658,6 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx, fs->flags = (flags & EXT2_FLAG_IGNORE_CSUM_ERRORS) | (fs->flags & ~EXT2_FLAG_IGNORE_CSUM_ERRORS); } - } else { - /* check inline data */ - if (inlinedata_fs && (inode->i_flags & EXT4_INLINE_DATA_FL)) - check_blocks_inline_data(ctx, pctx, &pb); } end_problem_latch(ctx, PR_LATCH_BLOCK); end_problem_latch(ctx, PR_LATCH_TOOBIG); |