Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e06eb3d authored by Minchan Kim's avatar Minchan Kim Committed by Jens Axboe
Browse files

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 <osandov@fb.com>
Signed-off-by: default avatarMinchan Kim <minchan@kernel.org>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 3e8a7069
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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)