[PATCH STABLE ONLY] swap: fix swapfile page to sector mapping

From: Anthony Iliopoulos
Date: Thu Mar 04 2021 - 10:07:32 EST


The following patches fix the swapfile page-to-sector mapping for block
devices that implement rw_page for all the stable kernels.

This is related to the upstream fix of commit caf6912f3f4a ("swap: fix
swapfile read/write offset"), but for kernels prior to v5.12-rc1 the bug
only affects swapfiles that sit on top of block devices which provide a
rw_page operation.