diff options
author | Christoph Hellwig <hch@lst.de> | 2021-08-04 11:56:27 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-08-16 10:50:33 -0600 |
commit | 358b348b9197b977276e0f034c474380565879e3 (patch) | |
tree | 32180f96d4a535f3b6e4c0f5cb31bb14b7d0bc4c | |
parent | cf58b537781df6eee2bbeae0463e45acf727978a (diff) | |
download | linux-358b348b9197b977276e0f034c474380565879e3.tar.bz2 |
virtio_blk: use bvec_virt
Use bvec_virt instead of open coding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20210804095634.460779-9-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/virtio_blk.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 4b49df2dfd23..767b4f72a54d 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -166,11 +166,8 @@ static inline void virtblk_request_done(struct request *req) { struct virtblk_req *vbr = blk_mq_rq_to_pdu(req); - if (req->rq_flags & RQF_SPECIAL_PAYLOAD) { - kfree(page_address(req->special_vec.bv_page) + - req->special_vec.bv_offset); - } - + if (req->rq_flags & RQF_SPECIAL_PAYLOAD) + kfree(bvec_virt(&req->special_vec)); blk_mq_end_request(req, virtblk_result(vbr)); } |