From: Ed L. Cashin Date: Wed, 20 Sep 2006 18:36:50 +0000 (-0400) Subject: aoe: use bio->bi_idx X-Git-Tag: MMI-PSA29.97-13-9~45515^2~47^2~91^2~4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=392e4845f9728114f7ffa8d7612683397fd4d441;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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" Acked-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- 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) buf->bio = bio; buf->resid = bio->bi_size; buf->sector = bio->bi_sector; - buf->bv = buf->bio->bi_io_vec; + buf->bv = &bio->bi_io_vec[bio->bi_idx]; + WARN_ON(buf->bv->bv_len == 0); buf->bv_resid = buf->bv->bv_len; buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset; diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c index f2b8f558e1bb..2d0bcdd96698 100644 --- a/drivers/block/aoe/aoecmd.c +++ b/drivers/block/aoe/aoecmd.c @@ -166,6 +166,7 @@ aoecmd_ata_rw(struct aoedev *d, struct frame *f) d->inprocess = NULL; } else if (buf->bv_resid == 0) { buf->bv++; + WARN_ON(buf->bv->bv_len == 0); buf->bv_resid = buf->bv->bv_len; buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset; }