block: refactor bio_iov_bvec_set()
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 23 Oct 2021 16:21:33 +0000 (17:21 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Oct 2021 14:00:48 +0000 (08:00 -0600)
commitfa5fa8ec6077a954e1aeb206fece15255b19e7b9
tree943d17b513dab06fc7a80a2fd8402bc1c20afd2c
parent54a88eb838d37af930c9f19e1930a4fba6789cb5
block: refactor bio_iov_bvec_set()

Combine bio_iov_bvec_set() and bio_iov_bvec_set_append() and let the
caller to do iov_iter_advance(). Also get rid of __bio_iov_bvec_set(),
which was duplicated in the final binary, and replace a weird
iov_iter_truncate() of a temporal iter copy with min() better reflecting
the intention.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/bcf1ac36fce769a514e19475f3623cd86a1d8b72.1635006010.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c