/* Swap reorganised , Asynchronous swapping added . Stephen Tweedie Removed race in async swapping. . Bruno Haible Add swap of shared pages through the page cache. . Stephen Tweedie Always use brw_page, life becomes simpler. 12 May 1998 Eric Biederman  */
static struct bio* get_swap_bio(gfp_t gfp_flags, struct page *page, bio_end_io_t end_io)
/* Swap reorganised , Asynchronous swapping added . Stephen Tweedie Removed race in async swapping. . Bruno Haible Add swap of shared pages through the page cache. . Stephen Tweedie Always use brw_page, life becomes simpler. 12 May 1998 Eric Biederman  */
static struct bio* get_swap_bio(gfp_t gfp_flags, struct page *page, bio_end_io_t end_io)
{
	struct bio *bio;
	bio = bio_alloc(gfp_flags, 1);
	if (bio) {
		bio->bi_sector = map_swap_page(page, &bio->bi_bdev);
		bio->bi_sector <<= PAGE_SHIFT - 9;
		bio->bi_io_vec[0].bv_page = page;
		bio->bi_io_vec[0].bv_len = PAGE_SIZE;
		bio->bi_io_vec[0].bv_offset = 0;
		bio->bi_vcnt = 1;
		bio->bi_idx = 0;
		bio->bi_size = PAGE_SIZE;
		bio->bi_end_io = end_io;
	}
	return bio;
}