/* During I/O bi_private points at the dio. After I/O, bi_private is used to implement a singly-linked list of completed BIOs, at dio->bio_list.  */
static void dio_bio_end_io(struct bio *bio, int error)
/* During I/O bi_private points at the dio. After I/O, bi_private is used to implement a singly-linked list of completed BIOs, at dio->bio_list.  */
static void dio_bio_end_io(struct bio *bio, int error)
{
	struct dio *dio = bio->bi_private;
	unsigned long flags;
	spin_lock_irqsave(&dio->bio_lock, flags);
	bio->bi_private = dio->bio_list;
	dio->bio_list = bio;
	if (--dio->refcount == 1 && dio->waiter)
		wake_up_process(dio->waiter);
	spin_unlock_irqrestore(&dio->bio_lock, flags);
}