aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/cciss.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 509b6490413b..ef50068def88 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1187,17 +1187,6 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
1187 } 1187 }
1188} 1188}
1189 1189
1190static inline void complete_buffers(struct bio *bio, int status)
1191{
1192 while (bio) {
1193 struct bio *xbh = bio->bi_next;
1194
1195 bio->bi_next = NULL;
1196 bio_endio(bio, status ? 0 : -EIO);
1197 bio = xbh;
1198 }
1199}
1200
1201static void cciss_check_queues(ctlr_info_t *h) 1190static void cciss_check_queues(ctlr_info_t *h)
1202{ 1191{
1203 int start_queue = h->next_to_run; 1192 int start_queue = h->next_to_run;
@@ -1263,21 +1252,14 @@ static void cciss_softirq_done(struct request *rq)
1263 pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir); 1252 pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir);
1264 } 1253 }
1265 1254
1266 complete_buffers(rq->bio, (rq->errors == 0));
1267
1268 if (blk_fs_request(rq)) {
1269 const int rw = rq_data_dir(rq);
1270
1271 disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors);
1272 }
1273
1274#ifdef CCISS_DEBUG 1255#ifdef CCISS_DEBUG
1275 printk("Done with %p\n", rq); 1256 printk("Done with %p\n", rq);
1276#endif /* CCISS_DEBUG */ 1257#endif /* CCISS_DEBUG */
1277 1258
1278 add_disk_randomness(rq->rq_disk); 1259 if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, blk_rq_bytes(rq)))
1260 BUG();
1261
1279 spin_lock_irqsave(&h->lock, flags); 1262 spin_lock_irqsave(&h->lock, flags);
1280 end_that_request_last(rq, (rq->errors == 0));
1281 cmd_free(h, cmd, 1); 1263 cmd_free(h, cmd, 1);
1282 cciss_check_queues(h); 1264 cciss_check_queues(h);
1283 spin_unlock_irqrestore(&h->lock, flags); 1265 spin_unlock_irqrestore(&h->lock, flags);
@@ -2544,7 +2526,6 @@ after_error_processing:
2544 } 2526 }
2545 cmd->rq->data_len = 0; 2527 cmd->rq->data_len = 0;
2546 cmd->rq->completion_data = cmd; 2528 cmd->rq->completion_data = cmd;
2547 blk_add_trace_rq(cmd->rq->q, cmd->rq, BLK_TA_COMPLETE);
2548 blk_complete_request(cmd->rq); 2529 blk_complete_request(cmd->rq);
2549} 2530}
2550 2531