diff options
-rw-r--r-- | drivers/block/ll_rw_blk.c | 20 | ||||
-rw-r--r-- | drivers/block/paride/pd.c | 2 | ||||
-rw-r--r-- | drivers/block/sx8.c | 4 | ||||
-rw-r--r-- | drivers/scsi/scsi_lib.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 2 |
5 files changed, 11 insertions, 19 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 11ef9d9ea139..f20eba22b14b 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -2038,7 +2038,6 @@ EXPORT_SYMBOL(blk_requeue_request); | |||
2038 | * @rq: request to be inserted | 2038 | * @rq: request to be inserted |
2039 | * @at_head: insert request at head or tail of queue | 2039 | * @at_head: insert request at head or tail of queue |
2040 | * @data: private data | 2040 | * @data: private data |
2041 | * @reinsert: true if request it a reinsertion of previously processed one | ||
2042 | * | 2041 | * |
2043 | * Description: | 2042 | * Description: |
2044 | * Many block devices need to execute commands asynchronously, so they don't | 2043 | * Many block devices need to execute commands asynchronously, so they don't |
@@ -2053,8 +2052,9 @@ EXPORT_SYMBOL(blk_requeue_request); | |||
2053 | * host that is unable to accept a particular command. | 2052 | * host that is unable to accept a particular command. |
2054 | */ | 2053 | */ |
2055 | void blk_insert_request(request_queue_t *q, struct request *rq, | 2054 | void blk_insert_request(request_queue_t *q, struct request *rq, |
2056 | int at_head, void *data, int reinsert) | 2055 | int at_head, void *data) |
2057 | { | 2056 | { |
2057 | int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK; | ||
2058 | unsigned long flags; | 2058 | unsigned long flags; |
2059 | 2059 | ||
2060 | /* | 2060 | /* |
@@ -2071,20 +2071,12 @@ void blk_insert_request(request_queue_t *q, struct request *rq, | |||
2071 | /* | 2071 | /* |
2072 | * If command is tagged, release the tag | 2072 | * If command is tagged, release the tag |
2073 | */ | 2073 | */ |
2074 | if (reinsert) | 2074 | if (blk_rq_tagged(rq)) |
2075 | blk_requeue_request(q, rq); | 2075 | blk_queue_end_tag(q, rq); |
2076 | else { | ||
2077 | int where = ELEVATOR_INSERT_BACK; | ||
2078 | |||
2079 | if (at_head) | ||
2080 | where = ELEVATOR_INSERT_FRONT; | ||
2081 | 2076 | ||
2082 | if (blk_rq_tagged(rq)) | 2077 | drive_stat_acct(rq, rq->nr_sectors, 1); |
2083 | blk_queue_end_tag(q, rq); | 2078 | __elv_add_request(q, rq, where, 0); |
2084 | 2079 | ||
2085 | drive_stat_acct(rq, rq->nr_sectors, 1); | ||
2086 | __elv_add_request(q, rq, where, 0); | ||
2087 | } | ||
2088 | if (blk_queue_plugged(q)) | 2080 | if (blk_queue_plugged(q)) |
2089 | __generic_unplug_device(q); | 2081 | __generic_unplug_device(q); |
2090 | else | 2082 | else |
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 202a5a74ad37..fa49d62626ba 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -723,7 +723,7 @@ static int pd_special_command(struct pd_unit *disk, | |||
723 | rq.ref_count = 1; | 723 | rq.ref_count = 1; |
724 | rq.waiting = &wait; | 724 | rq.waiting = &wait; |
725 | rq.end_io = blk_end_sync_rq; | 725 | rq.end_io = blk_end_sync_rq; |
726 | blk_insert_request(disk->gd->queue, &rq, 0, func, 0); | 726 | blk_insert_request(disk->gd->queue, &rq, 0, func); |
727 | wait_for_completion(&wait); | 727 | wait_for_completion(&wait); |
728 | rq.waiting = NULL; | 728 | rq.waiting = NULL; |
729 | if (rq.errors) | 729 | if (rq.errors) |
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index 797f5988c2b5..5ed3a6379452 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -614,7 +614,7 @@ static int carm_array_info (struct carm_host *host, unsigned int array_idx) | |||
614 | spin_unlock_irq(&host->lock); | 614 | spin_unlock_irq(&host->lock); |
615 | 615 | ||
616 | DPRINTK("blk_insert_request, tag == %u\n", idx); | 616 | DPRINTK("blk_insert_request, tag == %u\n", idx); |
617 | blk_insert_request(host->oob_q, crq->rq, 1, crq, 0); | 617 | blk_insert_request(host->oob_q, crq->rq, 1, crq); |
618 | 618 | ||
619 | return 0; | 619 | return 0; |
620 | 620 | ||
@@ -653,7 +653,7 @@ static int carm_send_special (struct carm_host *host, carm_sspc_t func) | |||
653 | crq->msg_bucket = (u32) rc; | 653 | crq->msg_bucket = (u32) rc; |
654 | 654 | ||
655 | DPRINTK("blk_insert_request, tag == %u\n", idx); | 655 | DPRINTK("blk_insert_request, tag == %u\n", idx); |
656 | blk_insert_request(host->oob_q, crq->rq, 1, crq, 0); | 656 | blk_insert_request(host->oob_q, crq->rq, 1, crq); |
657 | 657 | ||
658 | return 0; | 658 | return 0; |
659 | } | 659 | } |
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 861d5f5c9722..47a4ad40bf4e 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -92,7 +92,7 @@ int scsi_insert_special_req(struct scsi_request *sreq, int at_head) | |||
92 | */ | 92 | */ |
93 | sreq->sr_request->flags &= ~REQ_DONTPREP; | 93 | sreq->sr_request->flags &= ~REQ_DONTPREP; |
94 | blk_insert_request(sreq->sr_device->request_queue, sreq->sr_request, | 94 | blk_insert_request(sreq->sr_device->request_queue, sreq->sr_request, |
95 | at_head, sreq, 0); | 95 | at_head, sreq); |
96 | return 0; | 96 | return 0; |
97 | } | 97 | } |
98 | 98 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index ef1afc178c0a..4a99b76c5a33 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -544,7 +544,7 @@ extern void blk_end_sync_rq(struct request *rq); | |||
544 | extern void blk_attempt_remerge(request_queue_t *, struct request *); | 544 | extern void blk_attempt_remerge(request_queue_t *, struct request *); |
545 | extern void __blk_attempt_remerge(request_queue_t *, struct request *); | 545 | extern void __blk_attempt_remerge(request_queue_t *, struct request *); |
546 | extern struct request *blk_get_request(request_queue_t *, int, int); | 546 | extern struct request *blk_get_request(request_queue_t *, int, int); |
547 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *, int); | 547 | extern void blk_insert_request(request_queue_t *, struct request *, int, void *); |
548 | extern void blk_requeue_request(request_queue_t *, struct request *); | 548 | extern void blk_requeue_request(request_queue_t *, struct request *); |
549 | extern void blk_plug_device(request_queue_t *); | 549 | extern void blk_plug_device(request_queue_t *); |
550 | extern int blk_remove_plug(request_queue_t *); | 550 | extern int blk_remove_plug(request_queue_t *); |