Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blk-mq: remove useless checkings in blk_mq_update_nr_requests()

1) queue_requests_store() is the only caller of
blk_mq_update_nr_requests(), where queue is already freezed, no need to
check mq_freeze_depth;
2) q->tag_set must be set for request based device, and queue_is_mq() is
already checked in blk_mq_queue_attr_visible(), no need to check
q->tag_set.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Yu Kuai and committed by
Jens Axboe
8bd7195f dc1dd13d

+1 -8
+1 -8
block/blk-mq.c
··· 4930 4930 { 4931 4931 struct blk_mq_tag_set *set = q->tag_set; 4932 4932 struct blk_mq_hw_ctx *hctx; 4933 - int ret; 4933 + int ret = 0; 4934 4934 unsigned long i; 4935 - 4936 - if (WARN_ON_ONCE(!q->mq_freeze_depth)) 4937 - return -EINVAL; 4938 - 4939 - if (!set) 4940 - return -EINVAL; 4941 4935 4942 4936 if (q->nr_requests == nr) 4943 4937 return 0; 4944 4938 4945 4939 blk_mq_quiesce_queue(q); 4946 4940 4947 - ret = 0; 4948 4941 queue_for_each_hw_ctx(q, hctx, i) { 4949 4942 if (!hctx->tags) 4950 4943 continue;