@@ -1035,10 +1035,7 @@ static blk_qc_t do_make_request(struct bio *bio,
if (unlikely(bio_queue_enter(bio) != 0))
return BLK_QC_T_NONE;
- if (q->make_request_fn)
- ret = q->make_request_fn(q, bio);
- else
- ret = blk_mq_make_request(q, bio);
+ ret = q->make_request_fn(q, bio);
blk_queue_exit(q);
/*
@@ -1092,7 +1089,10 @@ static blk_qc_t __generic_make_request(struct bio *bio)
current->bio_list = bio_list_on_stack;
do {
- ret = do_make_request(bio, bio_list_on_stack);
+ if (bio->bi_disk->queue->make_request_fn)
+ ret = do_make_request(bio, bio_list_on_stack);
+ else
+ ret = __direct_make_request(bio);
} while ((bio = bio_list_pop(&bio_list_on_stack[0])));
current->bio_list = NULL; /* deactivate */
Don't bother with reshuffling the on-stack bio list if we know that we directly issue to a request based driver that can't re-inject bios. Signed-off-by: Christoph Hellwig <hch@lst.de> --- block/blk-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)