From: Eric Sandeen Fix some endian errors in the 16T ext[23] patches I sent in the past couple weeks. Signed-off-by: Eric Sandeen Signed-off-by: Andrew Morton --- fs/ext3/resize.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN fs/ext3/resize.c~more-ext3-16t-overflow-fixes-fix fs/ext3/resize.c --- a/fs/ext3/resize.c~more-ext3-16t-overflow-fixes-fix +++ a/fs/ext3/resize.c @@ -730,12 +730,14 @@ int ext3_group_add(struct super_block *s return -EPERM; } - if (es->s_blocks_count + input->blocks_count < es->s_blocks_count) { + if (le32_to_cpu(es->s_blocks_count) + input->blocks_count < + le32_to_cpu(es->s_blocks_count)) { ext3_warning(sb, __FUNCTION__, "blocks_count overflow\n"); return -EINVAL; } - if (es->s_inodes_count+EXT3_INODES_PER_GROUP(sb) < es->s_inodes_count) { + if (le32_to_cpu(es->s_inodes_count) + EXT3_INODES_PER_GROUP(sb) < + le32_to_cpu(es->s_inodes_count)) { ext3_warning(sb, __FUNCTION__, "inodes_count overflow\n"); return -EINVAL; } _