mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 01:09:38 -05:00
blk-mq: Invert check in blk_mq_update_nr_requests()
It's easier to read: if (x) X; else Y; over: if (!x) Y; else X; No functional change intended. Signed-off-by: John Garry <john.garry@huawei.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/1633429419-228500-5-git-send-email-john.garry@huawei.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
8fa044640f
commit
f6adcef5f3
1 changed files with 5 additions and 5 deletions
|
@ -3622,10 +3622,7 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
|
|||
* If we're using an MQ scheduler, just update the scheduler
|
||||
* queue depth. This is similar to what the old code would do.
|
||||
*/
|
||||
if (!hctx->sched_tags) {
|
||||
ret = blk_mq_tag_update_depth(hctx, &hctx->tags, nr,
|
||||
false);
|
||||
} else {
|
||||
if (hctx->sched_tags) {
|
||||
ret = blk_mq_tag_update_depth(hctx, &hctx->sched_tags,
|
||||
nr, true);
|
||||
if (blk_mq_is_sbitmap_shared(set->flags)) {
|
||||
|
@ -3634,6 +3631,9 @@ int blk_mq_update_nr_requests(struct request_queue *q, unsigned int nr)
|
|||
hctx->sched_tags->breserved_tags =
|
||||
&q->sched_breserved_tags;
|
||||
}
|
||||
} else {
|
||||
ret = blk_mq_tag_update_depth(hctx, &hctx->tags, nr,
|
||||
false);
|
||||
}
|
||||
if (ret)
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue