aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 540bf3676985..a8130a4ad6d4 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -1133,16 +1133,21 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
1133 * Schedule reads for missing parts of the packet. 1133 * Schedule reads for missing parts of the packet.
1134 */ 1134 */
1135 for (f = 0; f < pkt->frames; f++) { 1135 for (f = 0; f < pkt->frames; f++) {
1136 struct bio_vec *vec;
1137
1136 int p, offset; 1138 int p, offset;
1137 if (written[f]) 1139 if (written[f])
1138 continue; 1140 continue;
1139 bio = pkt->r_bios[f]; 1141 bio = pkt->r_bios[f];
1142 vec = bio->bi_io_vec;
1140 bio_init(bio); 1143 bio_init(bio);
1141 bio->bi_max_vecs = 1; 1144 bio->bi_max_vecs = 1;
1142 bio->bi_sector = pkt->sector + f * (CD_FRAMESIZE >> 9); 1145 bio->bi_sector = pkt->sector + f * (CD_FRAMESIZE >> 9);
1143 bio->bi_bdev = pd->bdev; 1146 bio->bi_bdev = pd->bdev;
1144 bio->bi_end_io = pkt_end_io_read; 1147 bio->bi_end_io = pkt_end_io_read;
1145 bio->bi_private = pkt; 1148 bio->bi_private = pkt;
1149 bio->bi_io_vec = vec;
1150 bio->bi_destructor = pkt_bio_destructor;
1146 1151
1147 p = (f * CD_FRAMESIZE) / PAGE_SIZE; 1152 p = (f * CD_FRAMESIZE) / PAGE_SIZE;
1148 offset = (f * CD_FRAMESIZE) % PAGE_SIZE; 1153 offset = (f * CD_FRAMESIZE) % PAGE_SIZE;
@@ -1439,6 +1444,8 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
1439 pkt->w_bio->bi_bdev = pd->bdev; 1444 pkt->w_bio->bi_bdev = pd->bdev;
1440 pkt->w_bio->bi_end_io = pkt_end_io_packet_write; 1445 pkt->w_bio->bi_end_io = pkt_end_io_packet_write;
1441 pkt->w_bio->bi_private = pkt; 1446 pkt->w_bio->bi_private = pkt;
1447 pkt->w_bio->bi_io_vec = bvec;
1448 pkt->w_bio->bi_destructor = pkt_bio_destructor;
1442 for (f = 0; f < pkt->frames; f++) 1449 for (f = 0; f < pkt->frames; f++)
1443 if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset)) 1450 if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset))
1444 BUG(); 1451 BUG();