block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
authorKemeng Shi <shikemeng@huaweicloud.com>
Mon, 16 Jan 2023 09:51:52 +0000 (17:51 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 30 Jan 2023 03:03:49 +0000 (20:03 -0700)
We jump to tag only for returning current rq. Return directly to
remove this tag.

Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230116095153.3810101-8-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bfq-iosched.c

index dbee5c61830c37a919e73201fb71d9969fcd7fe8..0416dfe05983c4729e46c4ef419efb198d2bf025 100644 (file)
@@ -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;
 }