]> git.baikalelectronics.ru Git - kernel.git/commit
swap: fix swapfile read/write offset
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:25:46 +0000 (17:25 -0700)
commitf3ba9da8be9d330d4a54ed78e1bb22f936fd1fd5
tree64099ad5cba8855452bb5eb518da72a5bac3855a
parentf7411d62fe990655610bb13d134df5b487f84756
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: 995666db1fbf ("mm: remove get_swap_bio")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/swap.h
mm/page_io.c
mm/swapfile.c