4 ms·
Your first point is the correct one. Basically the offset passed to bdev_write_page() was wrong, and has been like that since it was introduced to swap code ba
by kerneltrap 6y ago
Your first point is the correct one.
Basically the offset passed to bdev_write_page() was wrong, and has been like that since it was introduced to swap code back in v3.16.
In practice this means that the same filesystem corruption could happen with swapfiles sitting on top of filesystems which are created on top of block devices that bdev_write_page() supports (in specific: brd, zram, btt, pmem). This appears to be a non-common setup that apparently was not encountered. Nevertheless the fix is being backported to all stable kernels to cover those use-cases.
edit: bdev_write_page() was never broken, just the offset handed to it was wrong.