PM: hibernate: split and simplify hib_submit_io
authorChristoph Hellwig <hch@lst.de>
Wed, 7 May 2025 12:04:36 +0000 (14:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 May 2025 13:31:07 +0000 (07:31 -0600)
commit0cb8c299f81591699e908d1a6ad2dba6df642e25
tree97afeb65699db86340e2241bf6403f0f92f76a10
parentb2f676efe601586360e5f7461f6d36981ac1e6c9
PM: hibernate: split and simplify hib_submit_io

Split hib_submit_io into a sync and async version.  The sync version is
a small wrapper around bdev_rw_virt which implements all the logic to
add a kernel direct mapping range to a bio and synchronously submits it,
while the async version is slightly simplified using the
bio_add_virt_nofail for adding the single range.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250507120451.4000627-13-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
kernel/power/swap.c