Skip to content

Commit

Permalink
virtio_blk: use virtqueue_xxx wrappers
Browse files Browse the repository at this point in the history
Switch virtio_blk to new virtqueue_xxx wrappers.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Michael S. Tsirkin authored and Rusty Russell committed May 19, 2010
1 parent 505b045 commit 09ec6b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void blk_done(struct virtqueue *vq)
unsigned long flags;

spin_lock_irqsave(&vblk->lock, flags);
while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) {
while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) {
int error;

switch (vbr->status) {
Expand Down Expand Up @@ -158,7 +158,7 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
}
}

if (vblk->vq->vq_ops->add_buf(vblk->vq, vblk->sg, out, in, vbr) < 0) {
if (virtqueue_add_buf(vblk->vq, vblk->sg, out, in, vbr) < 0) {
mempool_free(vbr, vblk->pool);
return false;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ static void do_virtblk_request(struct request_queue *q)
}

if (issued)
vblk->vq->vq_ops->kick(vblk->vq);
virtqueue_kick(vblk->vq);
}

static void virtblk_prepare_flush(struct request_queue *q, struct request *req)
Expand Down

0 comments on commit 09ec6b6

Please sign in to comment.