spin_unlock_irq(q->queue_lock);
static int __make_request(request_queue_t *q, struct bio *bio){	struct request *req;	int el_ret, rw, nr_sectors, cur_nr_sectors, barrier, err, sync;	unsigned short prio;	sector_t sector;	sector = bio->bi_sector;	nr_sectors = bio_sectors(bio);	cur_nr_sectors = bio_cur_sectors(bio);	prio = bio_prio(bio);	rw = bio_data_dir(bio);	sync = bio_sync(bio);	/*	 * low level driver can indicate that it wants pages above a	 * certain limit bounced to low memory (ie for highmem, or even	 * ISA dma in theory)	 */	blk_queue_bounce(q, &bio);	spin_lock_prefetch(q->queue_lock);	barrier = bio_barrier(bio);	if (unlikely(barrier) && (q->ordered == QUEUE_ORDERED_NONE)) {		err = -EOPNOTSUPP;		goto end_io;	}	spin_lock_irq(q->queue_lock);	if (unlikely(barrier) || elv_queue_empty(q))		goto get_rq;	el_ret = elv_merge(q, &req, bio);	switch (el_ret) {		case ELEVATOR_BACK_MERGE:			BUG_ON(!rq_mergeable(req));			if (!q->back_merge_fn(q, req, bio))				break;			req->biotail->bi_next = bio;			req->biotail = bio;			req->nr_sectors = req->hard_nr_sectors += nr_sectors;			req->ioprio = ioprio_best(req->ioprio, prio);			drive_stat_acct(req, nr_sectors, 0);			if (!attempt_back_merge(q, req))				elv_merged_request(q, req);			goto out;		case ELEVATOR_FRONT_MERGE:			BUG_ON(!rq_mergeable(req));			if (!q->front_merge_fn(q, req, bio))				break;			bio->bi_next = req->bio;			req->bio = bio;			/*			 * may not be valid. if the low level driver said			 * it didn't need a bounce buffer then it better			 * not touch req->buffer either...			 */			req->buffer = bio_data(bio);			req->current_nr_sectors = cur_nr_sectors;			req->hard_cur_sectors = cur_nr_sectors;			req->sector = req->hard_sector = sector;			req->nr_sectors = req->hard_nr_sectors += nr_sectors;			req->ioprio = ioprio_best(req->ioprio, prio);			drive_stat_acct(req, nr_sectors, 0);			if (!attempt_front_merge(q, req))				elv_merged_request(q, req);			goto out;		/* ELV_NO_MERGE: elevator says don't/can't merge. */		default:			;	}get_rq:	/*	 * Grab a free request. This is might sleep but can not fail.	 */	spin_unlock_irq(q->queue_lock);	req = get_request_wait(q, rw, bio);	/*	 * After dropping the lock and possibly sleeping here, our request	 * may now be mergeable after it had proven unmergeable (above).	 * We don't worry about that case for efficiency. It won't happen	 * often, and the elevators are able to handle it.	 */	req->flags |= REQ_CMD;	/*	 * inherit FAILFAST from bio (for read-ahead, and explicit FAILFAST)	 */	if (bio_rw_ahead(bio) || bio_failfast(bio))		req->flags |= REQ_FAILFAST;	/*	 * REQ_BARRIER implies no merging, but lets make it explicit	 */	if (unlikely(barrier))		req->flags |= (REQ_HARDBARRIER | REQ_NOMERGE);	req->errors = 0;	req->hard_sector = req->sector = sector;	req->hard_nr_sectors = req->nr_sectors = nr_sectors;	req->current_nr_sectors = req->hard_cur_sectors = cur_nr_sectors;	req->nr_phys_segments = bio_phys_segments(q, bio);	req->nr_hw_segments = bio_hw_segments(q, bio);	req->buffer = bio_data(bio);	/* see ->buffer comment above */	req->waiting = NULL;	req->bio = req->biotail = bio;	req->ioprio = prio;	req->rq_disk = bio->bi_bdev->bd_disk;	req->start_time = jiffies;	spin_lock_irq(q->queue_lock);	if (elv_queue_empty(q))		blk_plug_device(q);	add_request(q, req);out:	if (sync)		__generic_unplug_device(q);	spin_unlock_irq(q->queue_lock);	return 0;end_io:	bio_endio(bio, nr_sectors << 9, err);	return 0;}