/* Queue a bio for processing by the low-level CD device. Must be called from process context.  */
static void pkt_queue_bio(struct pktcdvd_device *pd, struct bio *bio)
/* Queue a bio for processing by the low-level CD device. Must be called from process context.  */
static void pkt_queue_bio(struct pktcdvd_device *pd, struct bio *bio)
{
	spin_lock(&pd->iosched.lock);
	if (bio_data_dir(bio) == READ) {
		pkt_add_list_last(bio, &pd->iosched.read_queue,
				  &pd->iosched.read_queue_tail);
	} else {
		pkt_add_list_last(bio, &pd->iosched.write_queue,
				  &pd->iosched.write_queue_tail);
	}
	spin_unlock(&pd->iosched.lock);
	atomic_set(&pd->iosched.attention, 1);
	wake_up(&pd->wqueue);
}