aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/lguest_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/lguest_blk.c')
-rw-r--r--drivers/block/lguest_blk.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/block/lguest_blk.c b/drivers/block/lguest_blk.c
index 1e838ae60a60..fa8e42341b87 100644
--- a/drivers/block/lguest_blk.c
+++ b/drivers/block/lguest_blk.c
@@ -147,18 +147,18 @@ static unsigned int req_to_dma(struct request *req, struct lguest_dma *dma)
147 struct bio_vec *bvec; 147 struct bio_vec *bvec;
148 148
149 rq_for_each_segment(bvec, req, iter) { 149 rq_for_each_segment(bvec, req, iter) {
150 /* We told the block layer not to give us too many. */ 150 /* We told the block layer not to give us too many. */
151 BUG_ON(i == LGUEST_MAX_DMA_SECTIONS); 151 BUG_ON(i == LGUEST_MAX_DMA_SECTIONS);
152 /* If we had a zero-length segment, it would look like 152 /* If we had a zero-length segment, it would look like
153 * the end of the data referred to by the "struct 153 * the end of the data referred to by the "struct
154 * lguest_dma", so make sure that doesn't happen. */ 154 * lguest_dma", so make sure that doesn't happen. */
155 BUG_ON(!bvec->bv_len); 155 BUG_ON(!bvec->bv_len);
156 /* Convert page & offset to a physical address */ 156 /* Convert page & offset to a physical address */
157 dma->addr[i] = page_to_phys(bvec->bv_page) 157 dma->addr[i] = page_to_phys(bvec->bv_page)
158 + bvec->bv_offset; 158 + bvec->bv_offset;
159 dma->len[i] = bvec->bv_len; 159 dma->len[i] = bvec->bv_len;
160 len += bvec->bv_len; 160 len += bvec->bv_len;
161 i++; 161 i++;
162 } 162 }
163 /* If the array isn't full, we mark the end with a 0 length */ 163 /* If the array isn't full, we mark the end with a 0 length */
164 if (i < LGUEST_MAX_DMA_SECTIONS) 164 if (i < LGUEST_MAX_DMA_SECTIONS)