diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-29 15:53:12 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-29 10:23:25 -0600 |
commit | 766473681c131f2da81d62472864c8c97e021373 (patch) | |
tree | 883f769b8c44a0c0ea8d9786a16951e0699369de /block/blk-mq.h | |
parent | 419c3d5e8012928fbf9a086b07b618146cc9277b (diff) | |
download | linux-stable-766473681c131f2da81d62472864c8c97e021373.tar.gz linux-stable-766473681c131f2da81d62472864c8c97e021373.tar.bz2 linux-stable-766473681c131f2da81d62472864c8c97e021373.zip |
blk-mq: use BLK_MQ_NO_TAG in more places
Replace various magic -1 constants for tags with BLK_MQ_NO_TAG.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 10bfdfb494fa..a139b0631817 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -201,7 +201,7 @@ static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx, struct request *rq) { blk_mq_put_tag(hctx->tags, rq->mq_ctx, rq->tag); - rq->tag = -1; + rq->tag = BLK_MQ_NO_TAG; if (rq->rq_flags & RQF_MQ_INFLIGHT) { rq->rq_flags &= ~RQF_MQ_INFLIGHT; @@ -211,7 +211,7 @@ static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx, static inline void blk_mq_put_driver_tag(struct request *rq) { - if (rq->tag == -1 || rq->internal_tag == -1) + if (rq->tag == BLK_MQ_NO_TAG || rq->internal_tag == BLK_MQ_NO_TAG) return; __blk_mq_put_driver_tag(rq->mq_hctx, rq); |