diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:35:23 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-12 06:37:32 -0400 |
commit | 365d46dc9be9b3c833990a06f3994b1987eda578 (patch) | |
tree | 9397d1304144a288411f2118707f44ff5e862fa6 /drivers/block/virtio_blk.c | |
parent | 5dc64a3442b98eaa0e3730c35fcf00cf962a93e7 (diff) | |
parent | fd048088306656824958e7783ffcee27e241b361 (diff) |
Merge branch 'linus' into x86/xen
Conflicts:
arch/x86/kernel/cpu/common.c
arch/x86/kernel/process_64.c
arch/x86/xen/enlighten.c
Diffstat (limited to 'drivers/block/virtio_blk.c')
-rw-r--r-- | drivers/block/virtio_blk.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 42251095134f..6ec5fc052786 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -47,20 +47,20 @@ static void blk_done(struct virtqueue *vq) | |||
47 | 47 | ||
48 | spin_lock_irqsave(&vblk->lock, flags); | 48 | spin_lock_irqsave(&vblk->lock, flags); |
49 | while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { | 49 | while ((vbr = vblk->vq->vq_ops->get_buf(vblk->vq, &len)) != NULL) { |
50 | int uptodate; | 50 | int error; |
51 | switch (vbr->status) { | 51 | switch (vbr->status) { |
52 | case VIRTIO_BLK_S_OK: | 52 | case VIRTIO_BLK_S_OK: |
53 | uptodate = 1; | 53 | error = 0; |
54 | break; | 54 | break; |
55 | case VIRTIO_BLK_S_UNSUPP: | 55 | case VIRTIO_BLK_S_UNSUPP: |
56 | uptodate = -ENOTTY; | 56 | error = -ENOTTY; |
57 | break; | 57 | break; |
58 | default: | 58 | default: |
59 | uptodate = 0; | 59 | error = -EIO; |
60 | break; | 60 | break; |
61 | } | 61 | } |
62 | 62 | ||
63 | end_dequeued_request(vbr->req, uptodate); | 63 | __blk_end_request(vbr->req, error, blk_rq_bytes(vbr->req)); |
64 | list_del(&vbr->list); | 64 | list_del(&vbr->list); |
65 | mempool_free(vbr, vblk->pool); | 65 | mempool_free(vbr, vblk->pool); |
66 | } | 66 | } |
@@ -84,11 +84,11 @@ static bool do_req(struct request_queue *q, struct virtio_blk *vblk, | |||
84 | if (blk_fs_request(vbr->req)) { | 84 | if (blk_fs_request(vbr->req)) { |
85 | vbr->out_hdr.type = 0; | 85 | vbr->out_hdr.type = 0; |
86 | vbr->out_hdr.sector = vbr->req->sector; | 86 | vbr->out_hdr.sector = vbr->req->sector; |
87 | vbr->out_hdr.ioprio = vbr->req->ioprio; | 87 | vbr->out_hdr.ioprio = req_get_ioprio(vbr->req); |
88 | } else if (blk_pc_request(vbr->req)) { | 88 | } else if (blk_pc_request(vbr->req)) { |
89 | vbr->out_hdr.type = VIRTIO_BLK_T_SCSI_CMD; | 89 | vbr->out_hdr.type = VIRTIO_BLK_T_SCSI_CMD; |
90 | vbr->out_hdr.sector = 0; | 90 | vbr->out_hdr.sector = 0; |
91 | vbr->out_hdr.ioprio = vbr->req->ioprio; | 91 | vbr->out_hdr.ioprio = req_get_ioprio(vbr->req); |
92 | } else { | 92 | } else { |
93 | /* We don't put anything else in the queue. */ | 93 | /* We don't put anything else in the queue. */ |
94 | BUG(); | 94 | BUG(); |