lkml.org 
[lkml]   [2022]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/10] block, bfq: remove unnecessary goto tag in bfq_dispatch_rq_from_bfqq
Date
We jump to tag only for returning current rq. Return directly to
remove this tag.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
block/bfq-iosched.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index cffc5ff66ee6..64c1249d8eda 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5031,7 +5031,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
@@ -5051,12 +5051,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;
}

--
2.30.0
\
 
 \ /
  Last update: 2022-11-08 05:53    [W:0.051 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site