aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe/aoeblk.c
diff options
context:
space:
mode:
authorEd L. Cashin <ecashin@coraid.com>2006-09-20 14:36:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 15:53:50 -0400
commit392e4845f9728114f7ffa8d7612683397fd4d441 (patch)
treefb86e5b7f2a066c9e9458619b746a015e4d2dbe4 /drivers/block/aoe/aoeblk.c
parentb751e8b6590efdb76e1682c85bfcd5f3531ccae4 (diff)
aoe: use bio->bi_idx
Instead of starting with bio->bi_io_vec, use the offset in bio->bi_idx. Signed-off-by: "Ed L. Cashin" <ecashin@coraid.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/aoe/aoeblk.c')
-rw-r--r--drivers/block/aoe/aoeblk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index a7dbe6f53c14..196ae7a37643 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -142,7 +142,8 @@ aoeblk_make_request(request_queue_t *q, struct bio *bio)
142 buf->bio = bio; 142 buf->bio = bio;
143 buf->resid = bio->bi_size; 143 buf->resid = bio->bi_size;
144 buf->sector = bio->bi_sector; 144 buf->sector = bio->bi_sector;
145 buf->bv = buf->bio->bi_io_vec; 145 buf->bv = &bio->bi_io_vec[bio->bi_idx];
146 WARN_ON(buf->bv->bv_len == 0);
146 buf->bv_resid = buf->bv->bv_len; 147 buf->bv_resid = buf->bv->bv_len;
147 buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset; 148 buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset;
148 149