-
由 Jens Axboe 提交于
stable inclusion from linux-4.19.179 commit 6ceea9a764b422e32d9028e35d37ad68761ffd2c -------------------------------- commit caf6912f upstream. We're not factoring in the start of the file for where to write and read the swapfile, which leads to very unfortunate side effects of writing where we should not be... [This issue only affects swapfiles on filesystems on top of blockdevs that implement rw_page ops (brd, zram, btt, pmem), and not on top of any other block devices, in contrast to the upstream commit fix.] Fixes: dd6bd0d9 ("swap: use bdev_read_page() / bdev_write_page()") Signed-off-by: NJens Axboe <axboe@kernel.dk> Signed-off-by: NAnthony Iliopoulos <ailiop@suse.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
2b6b8c9b