summaryrefslogtreecommitdiffstats
path: root/mm/swapfile.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-01-26 15:52:47 +0100
committerJens Axboe <axboe@kernel.dk>2021-01-27 17:51:49 +0100
commit48d15436fde6feebcded7bd0fdc8ea4a9181b8fa (patch)
tree2662d4a0b4e595433ae4caa57c4f2c437c7a7fc9 /mm/swapfile.c
parentnilfs2: remove cruft in nilfs_alloc_seg_bio (diff)
downloadlinux-48d15436fde6feebcded7bd0fdc8ea4a9181b8fa.tar.xz
linux-48d15436fde6feebcded7bd0fdc8ea4a9181b8fa.zip
mm: remove get_swap_bio
Just reuse the block_device and sector from the swap_info structure, just as used by the SWP_SYNCHRONOUS path. Also remove the checks for NULL returns from bio_alloc as that can't happen for sleeping allocations. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'mm/swapfile.c')
-rw-r--r--mm/swapfile.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 9fffc5af29d1..bfa9e8b0c2ef 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -2302,16 +2302,6 @@ static sector_t map_swap_entry(swp_entry_t entry, struct block_device **bdev)
}
/*
- * Returns the page offset into bdev for the specified page's swap entry.
- */
-sector_t map_swap_page(struct page *page, struct block_device **bdev)
-{
- swp_entry_t entry;
- entry.val = page_private(page);
- return map_swap_entry(entry, bdev);
-}
-
-/*
* Free all of a swapdev's extent information
*/
static void destroy_swap_extents(struct swap_info_struct *sis)