aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/cpqarray.c2
-rw-r--r--drivers/block/floppy.c2
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/viodasd.c2
-rw-r--r--drivers/cdrom/cdu31a.c2
-rw-r--r--drivers/ide/ide-cd.c4
-rw-r--r--drivers/ide/ide-io.c6
-rw-r--r--drivers/message/i2o/i2o_block.c2
-rw-r--r--drivers/mmc/mmc_block.c4
-rw-r--r--drivers/s390/block/dasd.c2
-rw-r--r--drivers/s390/char/tape_block.c2
-rw-r--r--drivers/scsi/ide-scsi.c4
-rw-r--r--drivers/scsi/scsi_lib.c2
-rw-r--r--drivers/scsi/sd.c2
18 files changed, 23 insertions, 23 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 70eaa5c7ac08..21097a39a057 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -3471,7 +3471,7 @@ static inline boolean DAC960_ProcessCompletedRequest(DAC960_Command_T *Command,
3471 3471
3472 if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) { 3472 if (!end_that_request_first(Request, UpToDate, Command->BlockCount)) {
3473 3473
3474 end_that_request_last(Request); 3474 end_that_request_last(Request, UpToDate);
3475 3475
3476 if (Command->Completion) { 3476 if (Command->Completion) {
3477 complete(Command->Completion); 3477 complete(Command->Completion);
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index c3441b3f086e..d2815b7a9150 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2310,7 +2310,7 @@ static inline void complete_command( ctlr_info_t *h, CommandList_struct *cmd,
2310 printk("Done with %p\n", cmd->rq); 2310 printk("Done with %p\n", cmd->rq);
2311#endif /* CCISS_DEBUG */ 2311#endif /* CCISS_DEBUG */
2312 2312
2313 end_that_request_last(cmd->rq); 2313 end_that_request_last(cmd->rq, status ? 1 : -EIO);
2314 cmd_free(h,cmd,1); 2314 cmd_free(h,cmd,1);
2315} 2315}
2316 2316
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index cf1822a6361c..9bddb6874873 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -1036,7 +1036,7 @@ static inline void complete_command(cmdlist_t *cmd, int timeout)
1036 complete_buffers(cmd->rq->bio, ok); 1036 complete_buffers(cmd->rq->bio, ok);
1037 1037
1038 DBGPX(printk("Done with %p\n", cmd->rq);); 1038 DBGPX(printk("Done with %p\n", cmd->rq););
1039 end_that_request_last(cmd->rq); 1039 end_that_request_last(cmd->rq, ok ? 1 : -EIO);
1040} 1040}
1041 1041
1042/* 1042/*
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index f7e765a1d313..a5b857c5c4b8 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -2301,7 +2301,7 @@ static void floppy_end_request(struct request *req, int uptodate)
2301 add_disk_randomness(req->rq_disk); 2301 add_disk_randomness(req->rq_disk);
2302 floppy_off((long)req->rq_disk->private_data); 2302 floppy_off((long)req->rq_disk->private_data);
2303 blkdev_dequeue_request(req); 2303 blkdev_dequeue_request(req);
2304 end_that_request_last(req); 2304 end_that_request_last(req, uptodate);
2305 2305
2306 /* We're done with the request */ 2306 /* We're done with the request */
2307 current_req = NULL; 2307 current_req = NULL;
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 9e268ddedfbd..485345c8e632 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -136,7 +136,7 @@ static void nbd_end_request(struct request *req)
136 136
137 spin_lock_irqsave(q->queue_lock, flags); 137 spin_lock_irqsave(q->queue_lock, flags);
138 if (!end_that_request_first(req, uptodate, req->nr_sectors)) { 138 if (!end_that_request_first(req, uptodate, req->nr_sectors)) {
139 end_that_request_last(req); 139 end_that_request_last(req, uptodate);
140 } 140 }
141 spin_unlock_irqrestore(q->queue_lock, flags); 141 spin_unlock_irqrestore(q->queue_lock, flags);
142} 142}
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 1ded3b433459..9251f4131b53 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -770,7 +770,7 @@ static inline void carm_end_request_queued(struct carm_host *host,
770 rc = end_that_request_first(req, uptodate, req->hard_nr_sectors); 770 rc = end_that_request_first(req, uptodate, req->hard_nr_sectors);
771 assert(rc == 0); 771 assert(rc == 0);
772 772
773 end_that_request_last(req); 773 end_that_request_last(req, uptodate);
774 774
775 rc = carm_put_request(host, crq); 775 rc = carm_put_request(host, crq);
776 assert(rc == 0); 776 assert(rc == 0);
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 10740a065088..a05fe5843e6c 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -951,7 +951,7 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
951static void ub_end_rq(struct request *rq, int uptodate) 951static void ub_end_rq(struct request *rq, int uptodate)
952{ 952{
953 end_that_request_first(rq, uptodate, rq->hard_nr_sectors); 953 end_that_request_first(rq, uptodate, rq->hard_nr_sectors);
954 end_that_request_last(rq); 954 end_that_request_last(rq, uptodate);
955} 955}
956 956
957static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun, 957static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
index 2d518aa2720a..063f0304a163 100644
--- a/drivers/block/viodasd.c
+++ b/drivers/block/viodasd.c
@@ -305,7 +305,7 @@ static void viodasd_end_request(struct request *req, int uptodate,
305 if (end_that_request_first(req, uptodate, num_sectors)) 305 if (end_that_request_first(req, uptodate, num_sectors))
306 return; 306 return;
307 add_disk_randomness(req->rq_disk); 307 add_disk_randomness(req->rq_disk);
308 end_that_request_last(req); 308 end_that_request_last(req, uptodate);
309} 309}
310 310
311/* 311/*
diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c
index ac96de15d833..378e88d20757 100644
--- a/drivers/cdrom/cdu31a.c
+++ b/drivers/cdrom/cdu31a.c
@@ -1402,7 +1402,7 @@ static void do_cdu31a_request(request_queue_t * q)
1402 if (!end_that_request_first(req, 1, nblock)) { 1402 if (!end_that_request_first(req, 1, nblock)) {
1403 spin_lock_irq(q->queue_lock); 1403 spin_lock_irq(q->queue_lock);
1404 blkdev_dequeue_request(req); 1404 blkdev_dequeue_request(req);
1405 end_that_request_last(req); 1405 end_that_request_last(req, 1);
1406 spin_unlock_irq(q->queue_lock); 1406 spin_unlock_irq(q->queue_lock);
1407 } 1407 }
1408 continue; 1408 continue;
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 70aeb3a60120..d31117eb95aa 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -614,7 +614,7 @@ static void cdrom_end_request (ide_drive_t *drive, int uptodate)
614 */ 614 */
615 spin_lock_irqsave(&ide_lock, flags); 615 spin_lock_irqsave(&ide_lock, flags);
616 end_that_request_chunk(failed, 0, failed->data_len); 616 end_that_request_chunk(failed, 0, failed->data_len);
617 end_that_request_last(failed); 617 end_that_request_last(failed, 0);
618 spin_unlock_irqrestore(&ide_lock, flags); 618 spin_unlock_irqrestore(&ide_lock, flags);
619 } 619 }
620 620
@@ -1735,7 +1735,7 @@ end_request:
1735 1735
1736 spin_lock_irqsave(&ide_lock, flags); 1736 spin_lock_irqsave(&ide_lock, flags);
1737 blkdev_dequeue_request(rq); 1737 blkdev_dequeue_request(rq);
1738 end_that_request_last(rq); 1738 end_that_request_last(rq, 1);
1739 HWGROUP(drive)->rq = NULL; 1739 HWGROUP(drive)->rq = NULL;
1740 spin_unlock_irqrestore(&ide_lock, flags); 1740 spin_unlock_irqrestore(&ide_lock, flags);
1741 return ide_stopped; 1741 return ide_stopped;
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index ecfafcdafea4..8435b44a700b 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -89,7 +89,7 @@ int __ide_end_request(ide_drive_t *drive, struct request *rq, int uptodate,
89 89
90 blkdev_dequeue_request(rq); 90 blkdev_dequeue_request(rq);
91 HWGROUP(drive)->rq = NULL; 91 HWGROUP(drive)->rq = NULL;
92 end_that_request_last(rq); 92 end_that_request_last(rq, uptodate);
93 ret = 0; 93 ret = 0;
94 } 94 }
95 return ret; 95 return ret;
@@ -247,7 +247,7 @@ static void ide_complete_pm_request (ide_drive_t *drive, struct request *rq)
247 } 247 }
248 blkdev_dequeue_request(rq); 248 blkdev_dequeue_request(rq);
249 HWGROUP(drive)->rq = NULL; 249 HWGROUP(drive)->rq = NULL;
250 end_that_request_last(rq); 250 end_that_request_last(rq, 1);
251 spin_unlock_irqrestore(&ide_lock, flags); 251 spin_unlock_irqrestore(&ide_lock, flags);
252} 252}
253 253
@@ -379,7 +379,7 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
379 blkdev_dequeue_request(rq); 379 blkdev_dequeue_request(rq);
380 HWGROUP(drive)->rq = NULL; 380 HWGROUP(drive)->rq = NULL;
381 rq->errors = err; 381 rq->errors = err;
382 end_that_request_last(rq); 382 end_that_request_last(rq, !rq->errors);
383 spin_unlock_irqrestore(&ide_lock, flags); 383 spin_unlock_irqrestore(&ide_lock, flags);
384} 384}
385 385
diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c
index f283b5bafdd3..4f522527b7ed 100644
--- a/drivers/message/i2o/i2o_block.c
+++ b/drivers/message/i2o/i2o_block.c
@@ -466,7 +466,7 @@ static void i2o_block_end_request(struct request *req, int uptodate,
466 466
467 spin_lock_irqsave(q->queue_lock, flags); 467 spin_lock_irqsave(q->queue_lock, flags);
468 468
469 end_that_request_last(req); 469 end_that_request_last(req, uptodate);
470 470
471 if (likely(dev)) { 471 if (likely(dev)) {
472 dev->open_queue_depth--; 472 dev->open_queue_depth--;
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c
index abcf19116d70..8e380c14bf65 100644
--- a/drivers/mmc/mmc_block.c
+++ b/drivers/mmc/mmc_block.c
@@ -263,7 +263,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
263 */ 263 */
264 add_disk_randomness(req->rq_disk); 264 add_disk_randomness(req->rq_disk);
265 blkdev_dequeue_request(req); 265 blkdev_dequeue_request(req);
266 end_that_request_last(req); 266 end_that_request_last(req, 1);
267 } 267 }
268 spin_unlock_irq(&md->lock); 268 spin_unlock_irq(&md->lock);
269 } while (ret); 269 } while (ret);
@@ -289,7 +289,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
289 289
290 add_disk_randomness(req->rq_disk); 290 add_disk_randomness(req->rq_disk);
291 blkdev_dequeue_request(req); 291 blkdev_dequeue_request(req);
292 end_that_request_last(req); 292 end_that_request_last(req, 0);
293 spin_unlock_irq(&md->lock); 293 spin_unlock_irq(&md->lock);
294 294
295 return 0; 295 return 0;
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 7008d32433bf..fdb61380c523 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1035,7 +1035,7 @@ dasd_end_request(struct request *req, int uptodate)
1035 if (end_that_request_first(req, uptodate, req->hard_nr_sectors)) 1035 if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
1036 BUG(); 1036 BUG();
1037 add_disk_randomness(req->rq_disk); 1037 add_disk_randomness(req->rq_disk);
1038 end_that_request_last(req); 1038 end_that_request_last(req, uptodate);
1039} 1039}
1040 1040
1041/* 1041/*
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index 1efc9f21229e..559d51490e2f 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -78,7 +78,7 @@ tapeblock_end_request(struct request *req, int uptodate)
78{ 78{
79 if (end_that_request_first(req, uptodate, req->hard_nr_sectors)) 79 if (end_that_request_first(req, uptodate, req->hard_nr_sectors))
80 BUG(); 80 BUG();
81 end_that_request_last(req); 81 end_that_request_last(req, uptodate);
82} 82}
83 83
84static void 84static void
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 4cb1f3ed9100..3c688ef54660 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -1046,7 +1046,7 @@ static int idescsi_eh_reset (struct scsi_cmnd *cmd)
1046 1046
1047 /* kill current request */ 1047 /* kill current request */
1048 blkdev_dequeue_request(req); 1048 blkdev_dequeue_request(req);
1049 end_that_request_last(req); 1049 end_that_request_last(req, 0);
1050 if (req->flags & REQ_SENSE) 1050 if (req->flags & REQ_SENSE)
1051 kfree(scsi->pc->buffer); 1051 kfree(scsi->pc->buffer);
1052 kfree(scsi->pc); 1052 kfree(scsi->pc);
@@ -1056,7 +1056,7 @@ static int idescsi_eh_reset (struct scsi_cmnd *cmd)
1056 /* now nuke the drive queue */ 1056 /* now nuke the drive queue */
1057 while ((req = elv_next_request(drive->queue))) { 1057 while ((req = elv_next_request(drive->queue))) {
1058 blkdev_dequeue_request(req); 1058 blkdev_dequeue_request(req);
1059 end_that_request_last(req); 1059 end_that_request_last(req, 0);
1060 } 1060 }
1061 1061
1062 HWGROUP(drive)->rq = NULL; 1062 HWGROUP(drive)->rq = NULL;
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index a7f3f0c84db7..53551f1dfe21 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -791,7 +791,7 @@ static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int uptodate,
791 spin_lock_irqsave(q->queue_lock, flags); 791 spin_lock_irqsave(q->queue_lock, flags);
792 if (blk_rq_tagged(req)) 792 if (blk_rq_tagged(req))
793 blk_queue_end_tag(q, req); 793 blk_queue_end_tag(q, req);
794 end_that_request_last(req); 794 end_that_request_last(req, uptodate);
795 spin_unlock_irqrestore(q->queue_lock, flags); 795 spin_unlock_irqrestore(q->queue_lock, flags);
796 796
797 /* 797 /*
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3d3ad7d1b779..d651150ee76d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -748,7 +748,7 @@ static void sd_end_flush(request_queue_t *q, struct request *flush_rq)
748 * force journal abort of barriers 748 * force journal abort of barriers
749 */ 749 */
750 end_that_request_first(rq, -EOPNOTSUPP, rq->hard_nr_sectors); 750 end_that_request_first(rq, -EOPNOTSUPP, rq->hard_nr_sectors);
751 end_that_request_last(rq); 751 end_that_request_last(rq, -EOPNOTSUPP);
752 } 752 }
753} 753}
754 754