• Ma Haijun's avatar
    fs/ext4: fix calling put_ext4 with truncated offset · 0550870b
    Ma Haijun authored
    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>
ext4_journal.c 16.6 KB