Skip to content
Commit 36e4d958 authored by huangjianan@oppo.com's avatar huangjianan@oppo.com Committed by Jaegeuk Kim
Browse files

f2fs: check if swapfile is section-alligned



If the swapfile isn't created by pin and fallocate, it can't be
guaranteed section-aligned, so it may be selected by f2fs gc. When
gc_pin_file_threshold is reached, the address of swapfile may change,
but won't be synchronized to swap_extent, so swap will write to wrong
address, which will cause data corruption.

Signed-off-by: default avatarHuang Jianan <huangjianan@oppo.com>
Signed-off-by: default avatarGuo Weichao <guoweichao@oppo.com>
Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 1da66103
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