提交 392e4845 编写于 作者: E Ed L. Cashin 提交者: Greg Kroah-Hartman

aoe: use bio->bi_idx

Instead of starting with bio->bi_io_vec, use the offset in bio->bi_idx.
Signed-off-by: N"Ed L. Cashin" <ecashin@coraid.com>
Acked-by: NAlan Cox <alan@redhat.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b751e8b6
......@@ -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;
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册