swap: fix swapfile read/write offset swap-fix
authorJens Axboe <axboe@kernel.dk>
Tue, 2 Mar 2021 21:53:21 +0000 (14:53 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 3 Mar 2021 00:13:42 +0000 (17:13 -0700)
commite25b1010db005a59727e1ff5f43af889effd31a3
tree9dd90f251efffe17d36d742c5734fcea03afaa94
parenta5aedd7b65baa7b29be5ce392053e333d39ef985
swap: fix swapfile read/write offset

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")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/swap.h
mm/page_io.c
mm/swapfile.c