Commit 3c61429c authored by Yu Kuai's avatar Yu Kuai Committed by Jens Axboe
Browse files

block, bfq: remove local variable 'bfqq_already_existing' in bfq_init_rq()



Now that 'bfqq_already_existing' is only used in one branch, it can be
removed. There are no functional changes.

Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20240909134154.954924-7-yukuai1@huaweicloud.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e61e002a
Loading
Loading
Loading
Loading
+16 −21
Original line number Diff line number Diff line
@@ -6877,7 +6877,6 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
	const int is_sync = rq_is_sync(rq);
	struct bfq_queue *bfqq;
	bool new_queue = false;
	bool bfqq_already_existing = false;
	unsigned int a_idx = bfq_actuator_index(bfqd, bio);

	if (unlikely(!rq->elv.icq))
@@ -6918,17 +6917,9 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
				bfqq = bfq_get_bfqq_handle_split(bfqd, bic, bio,
								 true, is_sync,
								 NULL);
				if (unlikely(bfqq == &bfqd->oom_bfqq))
					bfqq_already_existing = true;
				else
				if (likely(bfqq != &bfqd->oom_bfqq)) {
					bfq_bfqq_resume_state(bfqq, bfqd, bic,
							      false);
			} else {
				bfqq_already_existing = true;
				bfq_bfqq_resume_state(bfqq, bfqd, bic, true);
			}

			if (!bfqq_already_existing) {
					bfqq->waker_bfqq = waker_bfqq;
					bfqq->tentative_waker_bfqq = NULL;

@@ -6940,9 +6931,13 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
					 * bfq_check_waker for details.
					 */
					if (waker_bfqq)
					hlist_add_head(&bfqq->woken_list_node,
						hlist_add_head(
							&bfqq->woken_list_node,
							&bfqq->waker_bfqq->woken_list);
				}
			} else {
				bfq_bfqq_resume_state(bfqq, bfqd, bic, true);
			}
		}
	}