Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319821
b: refs/heads/master
c: 2c95a32
h: refs/heads/master
i:
  319819: 5ff799a
v: v3
  • Loading branch information
Asias He authored and Rusty Russell committed Jul 30, 2012
1 parent 1783912 commit 7640560
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 483001c765af6892b3fc3726576cb42f17d1d6b5
refs/heads/master: 2c95a3290919541b846bee3e0fbaa75860929f53
9 changes: 3 additions & 6 deletions trunk/drivers/block/virtio_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ struct workqueue_struct *virtblk_wq;

struct virtio_blk
{
spinlock_t lock;

struct virtio_device *vdev;
struct virtqueue *vq;

Expand Down Expand Up @@ -65,7 +63,7 @@ static void blk_done(struct virtqueue *vq)
unsigned int len;
unsigned long flags;

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

Expand Down Expand Up @@ -99,7 +97,7 @@ static void blk_done(struct virtqueue *vq)
}
/* In case queue is stopped waiting for more buffers. */
blk_start_queue(vblk->disk->queue);
spin_unlock_irqrestore(&vblk->lock, flags);
spin_unlock_irqrestore(vblk->disk->queue->queue_lock, flags);
}

static bool do_req(struct request_queue *q, struct virtio_blk *vblk,
Expand Down Expand Up @@ -431,7 +429,6 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
goto out_free_index;
}

spin_lock_init(&vblk->lock);
vblk->vdev = vdev;
vblk->sg_elems = sg_elems;
sg_init_table(vblk->sg, vblk->sg_elems);
Expand All @@ -456,7 +453,7 @@ static int __devinit virtblk_probe(struct virtio_device *vdev)
goto out_mempool;
}

q = vblk->disk->queue = blk_init_queue(do_virtblk_request, &vblk->lock);
q = vblk->disk->queue = blk_init_queue(do_virtblk_request, NULL);
if (!q) {
err = -ENOMEM;
goto out_put_disk;
Expand Down

0 comments on commit 7640560

Please sign in to comment.