From 7e3da6c4b9a69f44b758b2c88190ac33ac4ea1a1 Mon Sep 17 00:00:00 2001 From: Laurent Riffard Date: Fri, 21 Sep 2007 08:32:28 +0200 Subject: pktcdvd: don't rely on bio_init() preserving bio->bi_destructor Signed-off-by: Laurent Riffard Signed-off-by: Jens Axboe --- drivers/block/pktcdvd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/block/pktcdvd.c') diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index ba2f550963b..a8130a4ad6d 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c @@ -1147,6 +1147,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt) bio->bi_end_io = pkt_end_io_read; bio->bi_private = pkt; bio->bi_io_vec = vec; + bio->bi_destructor = pkt_bio_destructor; p = (f * CD_FRAMESIZE) / PAGE_SIZE; offset = (f * CD_FRAMESIZE) % PAGE_SIZE; @@ -1444,6 +1445,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt) pkt->w_bio->bi_end_io = pkt_end_io_packet_write; pkt->w_bio->bi_private = pkt; pkt->w_bio->bi_io_vec = bvec; + pkt->w_bio->bi_destructor = pkt_bio_destructor; for (f = 0; f < pkt->frames; f++) if (!bio_add_page(pkt->w_bio, bvec[f].bv_page, CD_FRAMESIZE, bvec[f].bv_offset)) BUG(); -- cgit v1.2.3-70-g09d2