[PATCH v4 6/8] block, bfq: remove redundant check in bfq_put_cooperator

Kemeng Shi posted 8 patches 2 years, 8 months ago
[PATCH v4 6/8] block, bfq: remove redundant check in bfq_put_cooperator
Posted by Kemeng Shi 2 years, 8 months ago
We have already avoided a circular list in bfq_setup_merge (see comments
in bfq_setup_merge() for details), so bfq_queue will not appear in it's
new_bfqq list. Just remove this check.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
---
 block/bfq-iosched.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 4a17b22327f1..dbee5c61830c 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -5429,8 +5429,6 @@ void bfq_put_cooperator(struct bfq_queue *bfqq)
 	 */
 	__bfqq = bfqq->new_bfqq;
 	while (__bfqq) {
-		if (__bfqq == bfqq)
-			break;
 		next = __bfqq->new_bfqq;
 		bfq_put_queue(__bfqq);
 		__bfqq = next;
-- 
2.30.0