diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 3 | ||||
-rw-r--r-- | drivers/block/aoe/aoecmd.c | 1 |
2 files changed, 3 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 | ||
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) | |||
166 | d->inprocess = NULL; | 166 | d->inprocess = NULL; |
167 | } else if (buf->bv_resid == 0) { | 167 | } else if (buf->bv_resid == 0) { |
168 | buf->bv++; | 168 | buf->bv++; |
169 | WARN_ON(buf->bv->bv_len == 0); | ||
169 | buf->bv_resid = buf->bv->bv_len; | 170 | buf->bv_resid = buf->bv->bv_len; |
170 | buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset; | 171 | buf->bufaddr = page_address(buf->bv->bv_page) + buf->bv->bv_offset; |
171 | } | 172 | } |