virtio_blk: Use blk_rq_is_scsi()
authorBart Van Assche <bart.vanassche@wdc.com>
Thu, 17 Aug 2017 23:23:08 +0000 (16:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 18 Aug 2017 14:36:58 +0000 (08:36 -0600)
This patch does not change any functionality.

Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/virtio_blk.c

index 1498b899a593e31951c835f4f537d1bb03d0e596..0ba1eb911a4267859b9cf8db94da5bd0389d0623 100644 (file)
@@ -265,7 +265,7 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
        }
 
        spin_lock_irqsave(&vblk->vqs[qid].lock, flags);
-       if (req_op(req) == REQ_OP_SCSI_IN || req_op(req) == REQ_OP_SCSI_OUT)
+       if (blk_rq_is_scsi(req))
                err = virtblk_add_req_scsi(vblk->vqs[qid].vq, vbr, vbr->sg, num);
        else
                err = virtblk_add_req(vblk->vqs[qid].vq, vbr, vbr->sg, num);