summaryrefslogtreecommitdiff
path: root/drivers/block/mtip32xx
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-09-14 03:40:09 +0400
committerJens Axboe <axboe@fb.com>2014-09-22 22:00:07 +0400
commite2490073cd7c3d6f6ef6e029a208edd4d38efac4 (patch)
tree48465e67b335f6d696d698641365b4a4d1e89d32 /drivers/block/mtip32xx
parentbf57229745f849e500ba69ff91e35bc8160a7373 (diff)
downloadlinux-e2490073cd7c3d6f6ef6e029a208edd4d38efac4.tar.xz
blk-mq: call blk_mq_start_request from ->queue_rq
When we call blk_mq_start_request from the core blk-mq code before calling into ->queue_rq there is a racy window where the timeout handler can hit before we've fully set up the driver specific part of the command. Move the call to blk_mq_start_request into the driver so the driver can start the request only once it is fully set up. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/mtip32xx')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 0e2084f37c67..4042440a0470 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3783,6 +3783,8 @@ static int mtip_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *rq,
if (unlikely(mtip_check_unal_depth(hctx, rq)))
return BLK_MQ_RQ_QUEUE_BUSY;
+ blk_mq_start_request(rq);
+
ret = mtip_submit_request(hctx, rq);
if (likely(!ret))
return BLK_MQ_RQ_QUEUE_OK;