Re: [PATCH 6/7] block: remove the initialize_rq_fn blk_mq_ops method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/12/21 2:04 PM, Christoph Hellwig wrote:
Entirely unused now.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  block/blk-core.c       | 9 +--------
  include/linux/blk-mq.h | 5 -----
  2 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 9b8c706701900..2cc3189aaee35 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -615,16 +615,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 0e941f2175784..d7f70cc79ac7d 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -571,11 +571,6 @@ struct blk_mq_ops {
  	void (*exit_request)(struct blk_mq_tag_set *set, struct request *,
  			     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.

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux