]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/blk-mq.c
blk-mq: Make blk_mq_get_request() error path less confusing
authorBart Van Assche <bart.vanassche@wdc.com>
Mon, 16 Oct 2017 23:32:26 +0000 (16:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Nov 2017 18:33:56 +0000 (12:33 -0600)
commit21e768b442bb587123ea924620e74d6e5655d717
tree85982dcf7d7e98c8e22f5f0addc32796273f536c
parentc2e82a234873d905260a3bd0aca9577e85619bda
blk-mq: Make blk_mq_get_request() error path less confusing

blk_mq_get_tag() can modify data->ctx. This means that in the
error path of blk_mq_get_request() data->ctx should be passed to
blk_mq_put_ctx() instead of local_ctx. Note: since blk_mq_put_ctx()
ignores its argument, this patch does not change any functionality.

References: commit 1ad43c0078b7 ("blk-mq: don't leak preempt counter/q_usage_counter when allocating rq failed")
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c