block, bfq: use helper macro RQ_BFQQ to get bfqq of request

Use helper macro RQ_BFQQ to get bfqq of request.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230116095153.3810101-5-shikemeng@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Kemeng Shi 2023-01-16 17:51:49 +08:00 committed by Jens Axboe
parent 1c970450a7
commit 8ac2e43c35
1 changed files with 3 additions and 3 deletions

View File

@ -6859,14 +6859,14 @@ static struct bfq_queue *bfq_init_rq(struct request *rq)
return NULL;
/*
* Assuming that elv.priv[1] is set only if everything is set
* Assuming that RQ_BFQQ(rq) is set only if everything is set
* for this rq. This holds true, because this function is
* invoked only for insertion or merging, and, after such
* events, a request cannot be manipulated any longer before
* being removed from bfq.
*/
if (rq->elv.priv[1])
return rq->elv.priv[1];
if (RQ_BFQQ(rq))
return RQ_BFQQ(rq);
bic = icq_to_bic(rq->elv.icq);