blk-mq: remove blk_mq_complete_request_sync
authorMing Lei <ming.lei@redhat.com>
Wed, 24 Jul 2019 03:48:43 +0000 (11:48 +0800)
committerJens Axboe <axboe@kernel.dk>
Mon, 5 Aug 2019 03:41:29 +0000 (21:41 -0600)
blk_mq_tagset_wait_completed_request() has been applied for waiting
for completed request's fn, so not necessary to use
blk_mq_complete_request_sync() any more.

Cc: Max Gurtovoy <maxg@mellanox.com>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
drivers/nvme/host/core.c
include/linux/blk-mq.h

index 8bb5854a62f3f4d6a81c3e916856269ddddf1f04..6968de9d74024430c2d3e1d1fff04cb016708d9d 100644 (file)
@@ -652,13 +652,6 @@ bool blk_mq_complete_request(struct request *rq)
 }
 EXPORT_SYMBOL(blk_mq_complete_request);
 
-void blk_mq_complete_request_sync(struct request *rq)
-{
-       WRITE_ONCE(rq->state, MQ_RQ_COMPLETE);
-       rq->q->mq_ops->complete(rq);
-}
-EXPORT_SYMBOL_GPL(blk_mq_complete_request_sync);
-
 int blk_mq_request_started(struct request *rq)
 {
        return blk_mq_rq_state(rq) != MQ_RQ_IDLE;
index bcede8c879d1b83bca6fc01f8ad57c0f00dc6a7a..4ba374633dc8dace65f35bd0cc868856bc4e4ca5 100644 (file)
@@ -293,7 +293,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved)
                return true;
 
        nvme_req(req)->status = NVME_SC_ABORT_REQ;
-       blk_mq_complete_request_sync(req);
+       blk_mq_complete_request(req);
        return true;
 }
 EXPORT_SYMBOL_GPL(nvme_cancel_request);
index ee0719b649b6c56767f0378a8b1d483418cfab7f..1cdd2788cfa62c3c825a4ff0f16991e9ffe58202 100644 (file)
@@ -305,7 +305,6 @@ void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list);
 void blk_mq_kick_requeue_list(struct request_queue *q);
 void blk_mq_delay_kick_requeue_list(struct request_queue *q, unsigned long msecs);
 bool blk_mq_complete_request(struct request *rq);
-void blk_mq_complete_request_sync(struct request *rq);
 bool blk_mq_bio_list_merge(struct request_queue *q, struct list_head *list,
                           struct bio *bio, unsigned int nr_segs);
 bool blk_mq_queue_stopped(struct request_queue *q);