Skip to content
Snippets Groups Projects
Commit 0550870b authored by Ma Haijun's avatar Ma Haijun Committed by Tom Rini
Browse files

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: default avatarMa Haijun <mahaijuns@gmail.com>
parent f1782883
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment