]> 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)
commitb647744d676978e1fc2e6ee621581b4f4334ce75
tree64099ad5cba8855452bb5eb518da72a5bac3855a
parentab4d0548ae8032307a243b0f339eb6f7e9f85247
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: 7e3f8c327aff ("mm: remove get_swap_bio")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/swap.h
mm/page_io.c
mm/swapfile.c