diff options
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 964e51634f2d..6af250113c2a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -150,9 +150,8 @@ static int blkif_queue_request(struct request *req) | |||
150 | struct blkfront_info *info = req->rq_disk->private_data; | 150 | struct blkfront_info *info = req->rq_disk->private_data; |
151 | unsigned long buffer_mfn; | 151 | unsigned long buffer_mfn; |
152 | struct blkif_request *ring_req; | 152 | struct blkif_request *ring_req; |
153 | struct bio *bio; | 153 | struct req_iterator iter; |
154 | struct bio_vec *bvec; | 154 | struct bio_vec *bvec; |
155 | int idx; | ||
156 | unsigned long id; | 155 | unsigned long id; |
157 | unsigned int fsect, lsect; | 156 | unsigned int fsect, lsect; |
158 | int ref; | 157 | int ref; |
@@ -186,8 +185,7 @@ static int blkif_queue_request(struct request *req) | |||
186 | ring_req->operation = BLKIF_OP_WRITE_BARRIER; | 185 | ring_req->operation = BLKIF_OP_WRITE_BARRIER; |
187 | 186 | ||
188 | ring_req->nr_segments = 0; | 187 | ring_req->nr_segments = 0; |
189 | rq_for_each_bio (bio, req) { | 188 | rq_for_each_segment(bvec, req, iter) { |
190 | bio_for_each_segment (bvec, bio, idx) { | ||
191 | BUG_ON(ring_req->nr_segments | 189 | BUG_ON(ring_req->nr_segments |
192 | == BLKIF_MAX_SEGMENTS_PER_REQUEST); | 190 | == BLKIF_MAX_SEGMENTS_PER_REQUEST); |
193 | buffer_mfn = pfn_to_mfn(page_to_pfn(bvec->bv_page)); | 191 | buffer_mfn = pfn_to_mfn(page_to_pfn(bvec->bv_page)); |
@@ -213,7 +211,6 @@ static int blkif_queue_request(struct request *req) | |||
213 | .last_sect = lsect }; | 211 | .last_sect = lsect }; |
214 | 212 | ||
215 | ring_req->nr_segments++; | 213 | ring_req->nr_segments++; |
216 | } | ||
217 | } | 214 | } |
218 | 215 | ||
219 | info->ring.req_prod_pvt++; | 216 | info->ring.req_prod_pvt++; |