From: Minchan Kim Date: Thu, 30 Mar 2017 05:20:45 +0000 (+0900) Subject: block: do not put mq context in blk_mq_alloc_request_hctx X-Git-Tag: v4.12-rc1~175^2~232 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=3e06eb3dacdff52749df85694cf6bc48283973c6;p=linux.git block: do not put mq context in blk_mq_alloc_request_hctx In blk_mq_alloc_request_hctx, blk_mq_sched_get_request doesn't get sw context so we don't need to put the context with blk_mq_put_ctx. Unless, we will see preempt counter underflow. Cc: Omar Sandoval Signed-off-by: Minchan Kim Reviewed-by: Sagi Grimberg Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index e6ac774b0e41..ef63367077ad 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -324,7 +324,6 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw, rq = blk_mq_sched_get_request(q, NULL, rw, &alloc_data); - blk_mq_put_ctx(alloc_data.ctx); blk_queue_exit(q); if (!rq)