aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKemeng Shi <[email protected]>2023-01-16 17:51:52 +0800
committerJens Axboe <[email protected]>2023-01-29 20:03:49 -0700
commit87c971de8157b90494490d7c869a21b7f2123305 (patch)
treef876ea5fc166984fcfd5b0f3f72337faac2fb827
parent433d4b03e722bdfb1b6a75563cb45e8dca6784e7 (diff)
block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
We jump to tag only for returning current rq. Return directly to remove this tag. Reviewed-by: Jan Kara <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Kemeng Shi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/bfq-iosched.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index dbee5c61830c..0416dfe05983 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5120,7 +5120,7 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd,
bfq_dispatch_remove(bfqd->queue, rq);
if (bfqq != bfqd->in_service_queue)
- goto return_rq;
+ return rq;
/*
* If weight raising has to terminate for bfqq, then next
@@ -5140,12 +5140,9 @@ static struct request *bfq_dispatch_rq_from_bfqq(struct bfq_data *bfqd,
* belongs to CLASS_IDLE and other queues are waiting for
* service.
*/
- if (!(bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq)))
- goto return_rq;
+ if (bfq_tot_busy_queues(bfqd) > 1 && bfq_class_idle(bfqq))
+ bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED);
- bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_BUDGET_EXHAUSTED);
-
-return_rq:
return rq;
}