fs/ext4: fix calling put_ext4 with truncated offset
authorMa Haijun <mahaijuns@gmail.com>
Wed, 8 Jan 2014 00:15:33 +0000 (08:15 +0800)
committerTom Rini <trini@ti.com>
Mon, 20 Jan 2014 15:09:38 +0000 (10:09 -0500)
commit0550870b1c590be6beb09b57762ec43b5516f7d1
tree60b432add71bb6c1603fce7f486267c34e099074
parentf17828830df0d83c680f1703e491ac12703a3d19
fs/ext4: fix calling put_ext4 with truncated offset

Curently, 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.

Signed-off-by: Ma Haijun <mahaijuns@gmail.com>
fs/ext4/ext4_common.c
fs/ext4/ext4_journal.c
fs/ext4/ext4_write.c