]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
block: factor out a bio_await helper
authorChristoph Hellwig <hch@lst.de>
Tue, 7 Apr 2026 14:05:26 +0000 (16:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 Apr 2026 14:22:24 +0000 (08:22 -0600)
commit6fa747550e35f0a74e649b19d97055988a25b2e4
tree6a09feb5565fad13def838ad33bae139b6881bff
parent65565ca5f99b42fe62b9a10117cca04f4311dc66
block: factor out a bio_await helper

Add a new helper to wait for a bio and anything chained off it to
complete synchronously after submitting it.  This factors common code out
of submit_bio_wait and bio_await_chain and will also be useful for
file system code and thus is exported.

Note that this will now set REQ_SYNC also for the bio_await case for
consistency.  Nothing should look at the flag in the end_io handler,
but if something does having the flag set makes more sense.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://patch.msgid.link/20260407140538.633364-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/bio.h