On Mon, Mar 10, 2014 at 11:55:21PM -0700, Darrick J. Wong wrote: > In ext2fs_inline_data_dir_iterate(), we must be very careful to undo > any modifications we make to the dir_context pointer passed in by the > caller, because it's entirely possible that the caller will still want > to do something with the ctx or something inside. > > Specifically, ext2fs_dblist_dir_iterate() wants to be able to free > ctx->buf, and it reuses the ctx for multiple dblist entries. That > means that assigning ctx->buf will cause weird crashes at the end of > dir_iterate(). > > Since we're being careful with ctx, we might as well handle adding the > INLINE_DATA flag to ctx->flags for ext2fs_process_dir_block, since the > dblist caller forgets to unset the flag before reusing the ctx. > > This fixes some crashes and valgrind complaints in resize2fs, and is > necessary for the next patch, which fixes resize2fs not to corrupt > inline_data filesystems. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Thanks, applied. - Ted -- 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