block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly
authorJens Axboe <axboe@kernel.dk>
Tue, 28 Mar 2023 21:10:31 +0000 (15:10 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 Mar 2023 14:55:18 +0000 (08:55 -0600)
commit0a2481cde24f78f503cbc066df2c9c160e64cfd6
tree2d9ab0a38d3580220639c5677ae7f690dc6afe3b
parent3a93e40326c8f470e71d20b4c42d36767450f38f
block: ensure bio_alloc_map_data() deals with ITER_UBUF correctly

This helper blindly copies the iovec, even if we don't have one.
Make this case a bit smarter by only doing so if we have an iovec
array to copy.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-map.c