On 2011年06月23日 17:00, Yongqiang Yang Wrote: > On Thu, Jun 23, 2011 at 4:47 PM, Robin Dong <hao.bigrat@xxxxxxxxx> wrote: >> If eh_entries is equal to (or greater than) eh_max, the operation of >> inserting new extent_idx will make number of entries overflow. >> So check eh_entries before inserting the new extent_idx. >> >> Signed-off-by: Robin Dong <sanbai@xxxxxxxxxx> >> --- >> �fs/ext4/extents.c | � 18 ++++++++++-------- >> �1 files changed, 10 insertions(+), 8 deletions(-) >> >> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c >> index eb63c7b..792e77e 100644 >> --- a/fs/ext4/extents.c >> +++ b/fs/ext4/extents.c [snip] >> � � � �if (unlikely(ix > EXT_LAST_INDEX(curp->p_hdr))) { > condition ix > EXT_LAST_INDEX(curp->p_hdr) can not be true. Right? > May be we can remove this if-statement in this patch. > > Yongqiang. [snip] Good suggestion. But I suggest us to remove it a little bit later. When we do meta data checksum, the last index/extent record might be used for checksum, the above checking might still be helpful for bug probing. Thanks. Coly -- 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