fs/ext4: fix calling put_ext4 with truncated offset

Currently, we are using 32 bit multiplication to calculate the offset,
so the result will always be 32 bit.
This can silently cause file system corruption when performing a write
operation on partition larger than 4 GiB.

This patch address the issue by simply promoting the terms to 64 bit,
and let compilers decide how to do the multiplication efficiently.

********************************************************************
** basselsa@marvell.com:
** the original patch made modification to fs/ext4/ext4_write.c
** that does not exit in this version, the modifications was applied
** to fs/ext4/ext4fs.c

Change-Id: Iec933a137df2b5ef7f01bbb65144d9a1e64e6963
Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
Signed-off-by: Bassel Saba <basselsa@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/18693
Reviewed-by: Omri Itach <omrii@marvell.com>
Tested-by: Omri Itach <omrii@marvell.com>
3 files changed