swap: use __bio_add_page to add page to bio
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 31 May 2023 11:50:24 +0000 (04:50 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 31 May 2023 15:50:02 +0000 (09:50 -0600)
commitcb58bf91b138c1a8b18cca9503308789e26e3522
tree6326898ac584b3b121578bb262d37f26385d95b4
parent1ccf164ec866cb8575ab9b2e219fca875089c60e
swap: use __bio_add_page to add page to bio

The swap code only adds a single page to a newly created bio. So use
__bio_add_page() to add the page which is guaranteed to succeed in this
case.

This brings us closer to marking bio_add_page() as __must_check.

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/5bdafd9de806b2dab92302b30eb7a3a5f10c37d9.1685532726.git.johannes.thumshirn@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
mm/page_io.c