On 3/3/21 8:46 AM, Anthony Iliopoulos wrote: > On Tue, Mar 02, 2021 at 03:36:19PM -0700, Jens Axboe wrote: >> 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... >> >> Fixes: 48d15436fde6 ("mm: remove get_swap_bio") > > Presumably the usage of swap_page_sector was already affecting swap on > blockdevs that implement rw_page (currently brd, zram, btt, pmem), so it > may worth adding: > > Fixes: dd6bd0d9c7db ("swap: use bdev_read_page() / bdev_write_page()") > Cc: <stable@xxxxxxxxxxxxxxx> # v3.16+ > > for backporting, since it also affects stable. yes indeed, in fact that is the source of the original issue (copy/paste from that broken path). Fix is already upstream, but would be nice if someone would turn it into something that could be applied to stable. -- Jens Axboe