summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-05-18 08:31:00 +0300
committerJens Axboe <axboe@kernel.dk>2023-05-19 04:41:20 +0300
commitfdcab6cddef24a26b86d798814b3c25057e53c21 (patch)
tree50ae24bb898e0a20b25d388611c7563d25bd9988 /block/blk-mq.c
parentd97217e7f024bbe9aa62aea070771234c2879358 (diff)
downloadlinux-fdcab6cddef24a26b86d798814b3c25057e53c21.tar.xz
blk-mq: remove RQF_ELVPRIV
RQF_ELVPRIV is set for all non-flush requests that have RQF_ELV set. Expand this condition in the two users of the flag and remove it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230518053101.760632-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8b7e4daaa5b7..7470c6636dc4 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -393,10 +393,8 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
RB_CLEAR_NODE(&rq->rb_node);
if (!op_is_flush(data->cmd_flags) &&
- e->type->ops.prepare_request) {
+ e->type->ops.prepare_request)
e->type->ops.prepare_request(rq);
- rq->rq_flags |= RQF_ELVPRIV;
- }
}
return rq;
@@ -696,7 +694,7 @@ void blk_mq_free_request(struct request *rq)
struct request_queue *q = rq->q;
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
- if ((rq->rq_flags & RQF_ELVPRIV) &&
+ if ((rq->rq_flags & RQF_ELV) && !op_is_flush(rq->cmd_flags) &&
q->elevator->type->ops.finish_request)
q->elevator->type->ops.finish_request(rq);