Commit d24920e2 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: use memcpy_from_bvec in bio_copy_kern_endio_read

Use memcpy_from_bvec instead of open coding the logic.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20210727055646.118787-13-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f434cdc7
...@@ -400,7 +400,7 @@ static void bio_copy_kern_endio_read(struct bio *bio) ...@@ -400,7 +400,7 @@ static void bio_copy_kern_endio_read(struct bio *bio)
struct bvec_iter_all iter_all; struct bvec_iter_all iter_all;
bio_for_each_segment_all(bvec, bio, iter_all) { bio_for_each_segment_all(bvec, bio, iter_all) {
memcpy(p, page_address(bvec->bv_page), bvec->bv_len); memcpy_from_bvec(p, bvec);
p += bvec->bv_len; p += bvec->bv_len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment