From: Christoph Hellwig Date: Thu, 21 Oct 2021 06:06:06 +0000 (+0200) Subject: block: remove the initialize_rq_fn blk_mq_ops method X-Git-Tag: v6.6.17~9004^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4abafdc4360d993104c2b2f85943938a0c6ad025;p=platform%2Fkernel%2Flinux-rpi.git block: remove the initialize_rq_fn blk_mq_ops method Entirely unused now. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20211021060607.264371-7-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/block/blk-core.c b/block/blk-core.c index fd389a1..5ffe05b 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -606,16 +606,9 @@ EXPORT_SYMBOL(blk_get_queue); struct request *blk_get_request(struct request_queue *q, unsigned int op, blk_mq_req_flags_t flags) { - struct request *req; - WARN_ON_ONCE(op & REQ_NOWAIT); WARN_ON_ONCE(flags & ~(BLK_MQ_REQ_NOWAIT | BLK_MQ_REQ_PM)); - - req = blk_mq_alloc_request(q, op, flags); - if (!IS_ERR(req) && q->mq_ops->initialize_rq_fn) - q->mq_ops->initialize_rq_fn(req); - - return req; + return blk_mq_alloc_request(q, op, flags); } EXPORT_SYMBOL(blk_get_request); diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h index b4039fd..ebc45cf 100644 --- a/include/linux/blk-mq.h +++ b/include/linux/blk-mq.h @@ -567,11 +567,6 @@ struct blk_mq_ops { unsigned int); /** - * @initialize_rq_fn: Called from inside blk_get_request(). - */ - void (*initialize_rq_fn)(struct request *rq); - - /** * @cleanup_rq: Called before freeing one request which isn't completed * yet, and usually for freeing the driver private data. */