Skip to content
Commit 12fc760f authored by Changman Lee's avatar Changman Lee Committed by Jaegeuk Kim
Browse files

f2fs: fix overflow when calculating utilization on 32-bit



Use div_u64 to fix overflow when calculating utilization.
*long int* is 4-bytes on 32-bit so (user blocks * 100) might be
overflow if disk size is over e.g. 512GB.

Signed-off-by: default avatarChangman Lee <cm224.lee@samsung.com>
Reviewed-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 47b3bc90
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment