From: Zheng Liu <wenqing.lz@xxxxxxxxxx> A new dir doesn't be created in the parent dir with inline data due to this bug because rec_len is set incorrect. It will cause a wrong offset, and no free room can be found. Signed-off-by: Zheng Liu <wenqing.lz@xxxxxxxxxx> --- lib/ext2fs/dir_iterate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/dir_iterate.c b/lib/ext2fs/dir_iterate.c index 3f94ad4..198c5aa 100644 --- a/lib/ext2fs/dir_iterate.c +++ b/lib/ext2fs/dir_iterate.c @@ -335,7 +335,8 @@ int ext2fs_process_dir_inline_data(ext2_filsys fs, entry++; if (ret & DIRENT_CHANGED) { - dirent->rec_len = rec_len; + if (ext2fs_get_rec_len(fs, dirent, &rec_len)) + return BLOCK_ABORT; changed++; } if (ret & DIRENT_ABORT) { -- 1.7.12.rc2.18.g61b472e -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html