diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-24 15:52:28 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 15:42:32 -0500 |
commit | 92bc5a24844ada9b010f03c49a493e3edeadaa54 (patch) | |
tree | c2f56eefa07ff2a233e3be817feaa3f7b959a23e | |
parent | f9cd4bfe96955e7a1d3ec54b393dee87b815ba3b (diff) |
block: remove __blk_put_request()
Now there's no difference between blk_put_request() and
__blk_put_request() anymore, get rid of the underscore version and
convert the few callers.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Tested-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/blk-core.c | 9 | ||||
-rw-r--r-- | block/blk-merge.c | 2 | ||||
-rw-r--r-- | drivers/scsi/osd/osd_initiator.c | 4 | ||||
-rw-r--r-- | drivers/scsi/osst.c | 2 | ||||
-rw-r--r-- | drivers/scsi/scsi_error.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sg.c | 2 | ||||
-rw-r--r-- | drivers/scsi/st.c | 2 | ||||
-rw-r--r-- | drivers/target/target_core_pscsi.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 1 |
9 files changed, 8 insertions, 18 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 18538a41a532..700dd4587282 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -803,15 +803,6 @@ void part_round_stats(struct request_queue *q, int cpu, struct hd_struct *part) | |||
803 | } | 803 | } |
804 | EXPORT_SYMBOL_GPL(part_round_stats); | 804 | EXPORT_SYMBOL_GPL(part_round_stats); |
805 | 805 | ||
806 | void __blk_put_request(struct request_queue *q, struct request *req) | ||
807 | { | ||
808 | if (unlikely(!q)) | ||
809 | return; | ||
810 | |||
811 | blk_mq_free_request(req); | ||
812 | } | ||
813 | EXPORT_SYMBOL_GPL(__blk_put_request); | ||
814 | |||
815 | void blk_put_request(struct request *req) | 806 | void blk_put_request(struct request *req) |
816 | { | 807 | { |
817 | blk_mq_free_request(req); | 808 | blk_mq_free_request(req); |
diff --git a/block/blk-merge.c b/block/blk-merge.c index c068c30b0c35..3d073305da33 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c | |||
@@ -866,7 +866,7 @@ int blk_attempt_req_merge(struct request_queue *q, struct request *rq, | |||
866 | 866 | ||
867 | free = attempt_merge(q, rq, next); | 867 | free = attempt_merge(q, rq, next); |
868 | if (free) { | 868 | if (free) { |
869 | __blk_put_request(q, free); | 869 | blk_put_request(free); |
870 | return 1; | 870 | return 1; |
871 | } | 871 | } |
872 | 872 | ||
diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index e19fa883376f..60cf7c5eb880 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c | |||
@@ -506,11 +506,11 @@ static void osd_request_async_done(struct request *req, blk_status_t error) | |||
506 | 506 | ||
507 | _set_error_resid(or, req, error); | 507 | _set_error_resid(or, req, error); |
508 | if (req->next_rq) { | 508 | if (req->next_rq) { |
509 | __blk_put_request(req->q, req->next_rq); | 509 | blk_put_request(req->next_rq); |
510 | req->next_rq = NULL; | 510 | req->next_rq = NULL; |
511 | } | 511 | } |
512 | 512 | ||
513 | __blk_put_request(req->q, req); | 513 | blk_put_request(req); |
514 | or->request = NULL; | 514 | or->request = NULL; |
515 | or->in.req = NULL; | 515 | or->in.req = NULL; |
516 | or->out.req = NULL; | 516 | or->out.req = NULL; |
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 7a1a1edde35d..664c1238a87f 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c | |||
@@ -341,7 +341,7 @@ static void osst_end_async(struct request *req, blk_status_t status) | |||
341 | blk_rq_unmap_user(SRpnt->bio); | 341 | blk_rq_unmap_user(SRpnt->bio); |
342 | } | 342 | } |
343 | 343 | ||
344 | __blk_put_request(req->q, req); | 344 | blk_put_request(req); |
345 | } | 345 | } |
346 | 346 | ||
347 | /* osst_request memory management */ | 347 | /* osst_request memory management */ |
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index fff128aa9ec2..dd338a8cd275 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1932,7 +1932,7 @@ maybe_retry: | |||
1932 | 1932 | ||
1933 | static void eh_lock_door_done(struct request *req, blk_status_t status) | 1933 | static void eh_lock_door_done(struct request *req, blk_status_t status) |
1934 | { | 1934 | { |
1935 | __blk_put_request(req->q, req); | 1935 | blk_put_request(req); |
1936 | } | 1936 | } |
1937 | 1937 | ||
1938 | /** | 1938 | /** |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index c6ad00703c5b..4e27460ec926 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -1390,7 +1390,7 @@ sg_rq_end_io(struct request *rq, blk_status_t status) | |||
1390 | */ | 1390 | */ |
1391 | srp->rq = NULL; | 1391 | srp->rq = NULL; |
1392 | scsi_req_free_cmd(scsi_req(rq)); | 1392 | scsi_req_free_cmd(scsi_req(rq)); |
1393 | __blk_put_request(rq->q, rq); | 1393 | blk_put_request(rq); |
1394 | 1394 | ||
1395 | write_lock_irqsave(&sfp->rq_list_lock, iflags); | 1395 | write_lock_irqsave(&sfp->rq_list_lock, iflags); |
1396 | if (unlikely(srp->orphan)) { | 1396 | if (unlikely(srp->orphan)) { |
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 307df2fa39a3..7ff22d3f03e3 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c | |||
@@ -530,7 +530,7 @@ static void st_scsi_execute_end(struct request *req, blk_status_t status) | |||
530 | complete(SRpnt->waiting); | 530 | complete(SRpnt->waiting); |
531 | 531 | ||
532 | blk_rq_unmap_user(tmp); | 532 | blk_rq_unmap_user(tmp); |
533 | __blk_put_request(req->q, req); | 533 | blk_put_request(req); |
534 | } | 534 | } |
535 | 535 | ||
536 | static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, | 536 | static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd, |
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index 47d76c862014..c062d363dce3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c | |||
@@ -1094,7 +1094,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status) | |||
1094 | break; | 1094 | break; |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | __blk_put_request(req->q, req); | 1097 | blk_put_request(req); |
1098 | kfree(pt); | 1098 | kfree(pt); |
1099 | } | 1099 | } |
1100 | 1100 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index a9f6db8abcda..c502a7f40e84 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -906,7 +906,6 @@ extern blk_qc_t direct_make_request(struct bio *bio); | |||
906 | extern void blk_rq_init(struct request_queue *q, struct request *rq); | 906 | extern void blk_rq_init(struct request_queue *q, struct request *rq); |
907 | extern void blk_init_request_from_bio(struct request *req, struct bio *bio); | 907 | extern void blk_init_request_from_bio(struct request *req, struct bio *bio); |
908 | extern void blk_put_request(struct request *); | 908 | extern void blk_put_request(struct request *); |
909 | extern void __blk_put_request(struct request_queue *, struct request *); | ||
910 | extern struct request *blk_get_request(struct request_queue *, unsigned int op, | 909 | extern struct request *blk_get_request(struct request_queue *, unsigned int op, |
911 | blk_mq_req_flags_t flags); | 910 | blk_mq_req_flags_t flags); |
912 | extern int blk_lld_busy(struct request_queue *q); | 911 | extern int blk_lld_busy(struct request_queue *q); |