sd: use bvec_virt
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Aug 2021 09:56:29 +0000 (11:56 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 16 Aug 2021 16:50:33 +0000 (10:50 -0600)
Use bvec_virt instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20210804095634.460779-11-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c

index b8d55af763f92ddc62f0ca5d546dd03801a6fc1e..5b5b8266e1429a83ed176986fcf405c9dcbe84ec 100644 (file)
@@ -886,7 +886,7 @@ static blk_status_t sd_setup_unmap_cmnd(struct scsi_cmnd *cmd)
        cmd->cmnd[0] = UNMAP;
        cmd->cmnd[8] = 24;
 
-       buf = page_address(rq->special_vec.bv_page);
+       buf = bvec_virt(&rq->special_vec);
        put_unaligned_be16(6 + 16, &buf[0]);
        put_unaligned_be16(16, &buf[2]);
        put_unaligned_be64(lba, &buf[8]);