Commit e44a6a23 authored by Xianting Tian's avatar Xianting Tian Committed by Jens Axboe

blk-mq: use BLK_MQ_NO_TAG for no tag

Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Signed-off-by: default avatarXianting Tian <tian.xianting@h3c.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cdfcef9e
...@@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq) ...@@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq)
rq->__sector = (sector_t) -1; rq->__sector = (sector_t) -1;
INIT_HLIST_NODE(&rq->hash); INIT_HLIST_NODE(&rq->hash);
RB_CLEAR_NODE(&rq->rb_node); RB_CLEAR_NODE(&rq->rb_node);
rq->tag = -1; rq->tag = BLK_MQ_NO_TAG;
rq->internal_tag = -1; rq->internal_tag = BLK_MQ_NO_TAG;
rq->start_time_ns = ktime_get_ns(); rq->start_time_ns = ktime_get_ns();
rq->part = NULL; rq->part = NULL;
refcount_set(&rq->ref, 1); refcount_set(&rq->ref, 1);
......
...@@ -475,7 +475,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head, ...@@ -475,7 +475,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head,
goto run; goto run;
} }
WARN_ON(e && (rq->tag != -1)); WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG));
if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) { if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) {
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment