Skip to content

Commit

Permalink
blk-mq: use blk_mq_put_driver_tag() to put tag
Browse files Browse the repository at this point in the history
Expect arguments, blk_mq_put_driver_tag_hctx() and blk_mq_put_driver_tag()
is same. We can just use argument 'request' to put tag by blk_mq_put_driver_tag().
Then we can remove the unused blk_mq_put_driver_tag_hctx().

Signed-off-by: Yufen Yu <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Yufen Yu authored and axboe committed Mar 24, 2019
1 parent 1bdd3db commit 13f0638
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions block/blk-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static void flush_end_io(struct request *flush_rq, blk_status_t error)
blk_mq_tag_set_rq(hctx, flush_rq->tag, fq->orig_rq);
flush_rq->tag = -1;
} else {
blk_mq_put_driver_tag_hctx(hctx, flush_rq);
blk_mq_put_driver_tag(flush_rq);
flush_rq->internal_tag = -1;
}

Expand Down Expand Up @@ -324,7 +324,7 @@ static void mq_flush_data_end_io(struct request *rq, blk_status_t error)

if (q->elevator) {
WARN_ON(rq->tag < 0);
blk_mq_put_driver_tag_hctx(hctx, rq);
blk_mq_put_driver_tag(rq);
}

/*
Expand Down
9 changes: 0 additions & 9 deletions block/blk-mq.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,6 @@ static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx,
}
}

static inline void blk_mq_put_driver_tag_hctx(struct blk_mq_hw_ctx *hctx,
struct request *rq)
{
if (rq->tag == -1 || rq->internal_tag == -1)
return;

__blk_mq_put_driver_tag(hctx, rq);
}

static inline void blk_mq_put_driver_tag(struct request *rq)
{
if (rq->tag == -1 || rq->internal_tag == -1)
Expand Down

0 comments on commit 13f0638

Please sign in to comment.