lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1375436989-18948-20-git-send-email-wenqing.lz@taobao.com> Date: Fri, 2 Aug 2013 17:49:46 +0800 From: Zheng Liu <gnehzuil.liu@...il.com> To: linux-ext4@...r.kernel.org Cc: Theodore Ts'o <tytso@....edu>, Zheng Liu <wenqing.lz@...bao.com> Subject: [PATCH v1 19/22] e2fsck: check inline_data in pass3 From: Zheng Liu <wenqing.lz@...bao.com> In e2fsck_expand_directory() we don't handle a dir with inline data because when this function is called the directory inode shouldn't contains inline data. Signed-off-by: Theodore Ts'o <tytso@....edu> Signed-off-by: Zheng Liu <wenqing.lz@...bao.com> --- e2fsck/pass3.c | 12 ++++++++++++ e2fsck/rehash.c | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/e2fsck/pass3.c b/e2fsck/pass3.c index a379e9b..5052345 100644 --- a/e2fsck/pass3.c +++ b/e2fsck/pass3.c @@ -787,6 +787,18 @@ errcode_t e2fsck_expand_directory(e2fsck_t ctx, ext2_ino_t dir, es.ctx = ctx; es.dir = dir; + /* + * 'lost+found' dir shouldn't contains inline data. So we + * need to clear this flag. + */ + if (ext2fs_inode_has_inline_data(fs, dir)) { + retval = ext2fs_read_inode(fs, dir, &inode); + if (retval) + return retval; + inode.i_flags &= ~EXT4_INLINE_DATA_FL; + e2fsck_write_inode(ctx, dir, &inode, "clear inline_data flag"); + } + retval = ext2fs_block_iterate3(fs, dir, BLOCK_FLAG_APPEND, 0, expand_dir_proc, &es); diff --git a/e2fsck/rehash.c b/e2fsck/rehash.c index 5592e3f..82aeddd 100644 --- a/e2fsck/rehash.c +++ b/e2fsck/rehash.c @@ -937,7 +937,8 @@ void e2fsck_rehash_directories(e2fsck_t ctx) #if 0 fix_problem(ctx, PR_3A_OPTIMIZE_DIR, &pctx); #endif - pctx.errcode = e2fsck_rehash_dir(ctx, ino); + if (!ext2fs_inode_has_inline_data(ctx->fs, ino)) + pctx.errcode = e2fsck_rehash_dir(ctx, ino); if (pctx.errcode) { end_problem_latch(ctx, PR_LATCH_OPTIMIZE_DIR); fix_problem(ctx, PR_3A_OPTIMIZE_DIR_ERR, &pctx); -- 1.7.9.7 -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists