Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[sfrench/cifs-2.6.git] / block / blk-mq.c
index b038ec680e843e14aa2f3a7b3d967bd802efd4db..f78d3287dd823f6b431c87eec675580c1e987d55 100644 (file)
@@ -669,8 +669,6 @@ void blk_mq_start_request(struct request *rq)
 {
        struct request_queue *q = rq->q;
 
-       blk_mq_sched_started_request(rq);
-
        trace_block_rq_issue(q, rq);
 
        if (test_bit(QUEUE_FLAG_STATS, &q->queue_flags)) {
@@ -1960,9 +1958,13 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
        rq = blk_mq_get_request(q, bio, &data);
        if (unlikely(!rq)) {
                rq_qos_cleanup(q, bio);
-               if (bio->bi_opf & REQ_NOWAIT)
+
+               cookie = BLK_QC_T_NONE;
+               if (bio->bi_opf & REQ_NOWAIT_INLINE)
+                       cookie = BLK_QC_T_EAGAIN;
+               else if (bio->bi_opf & REQ_NOWAIT)
                        bio_wouldblock_error(bio);
-               return BLK_QC_T_NONE;
+               return cookie;
        }
 
        trace_block_getrq(q, bio, bio->bi_opf);