blk-mq: divert __blk_put_request for MQ ops
authorChristoph Hellwig <hch@infradead.org>
Fri, 7 Feb 2014 18:22:37 +0000 (10:22 -0800)
committerJens Axboe <axboe@fb.com>
Fri, 7 Feb 2014 18:58:54 +0000 (11:58 -0700)
__blk_put_request needs to call into the blk-mq code just like
blk_put_request.  As we don't have the queue lock in this case both
end up calling the same function.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c

index c00e0bdeab4ab4724c42b379717200d405d9c584..06636f3ad424132000432d0cc2dbc93507dd21a7 100644 (file)
@@ -1278,6 +1278,11 @@ void __blk_put_request(struct request_queue *q, struct request *req)
        if (unlikely(!q))
                return;
 
+       if (q->mq_ops) {
+               blk_mq_free_request(req);
+               return;
+       }
+
        blk_pm_put_request(req);
 
        elv_completed_request(q, req);