From fb19a141266d0bad3cee4e45f03c167f26cd8508 Mon Sep 17 00:00:00 2001 From: Kiyoshi Ueda Date: Tue, 11 Dec 2007 17:50:03 -0500 Subject: [PATCH] --- yaml --- r: 77623 b: refs/heads/master c: 3daeea29f9348263e0dda89a565074390475bdf8 h: refs/heads/master i: 77621: 12d7e82490335938c92b1c8d1ee04cb570a48f5a 77619: 5d837fd2abc716ec2015bf756d66f7ea44b00c26 77615: 54cf5e37aeafbfc4031fbfcc9904fcdc23ee7af8 v: v3 --- [refs] | 2 +- trunk/drivers/block/cciss.c | 25 +++---------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index 3204b2f05039..e77379c9258e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5a330e39b13fe8d368d015338a4267129f502a55 +refs/heads/master: 3daeea29f9348263e0dda89a565074390475bdf8 diff --git a/trunk/drivers/block/cciss.c b/trunk/drivers/block/cciss.c index 509b6490413b..ef50068def88 100644 --- a/trunk/drivers/block/cciss.c +++ b/trunk/drivers/block/cciss.c @@ -1187,17 +1187,6 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, } } -static inline void complete_buffers(struct bio *bio, int status) -{ - while (bio) { - struct bio *xbh = bio->bi_next; - - bio->bi_next = NULL; - bio_endio(bio, status ? 0 : -EIO); - bio = xbh; - } -} - static void cciss_check_queues(ctlr_info_t *h) { int start_queue = h->next_to_run; @@ -1263,21 +1252,14 @@ static void cciss_softirq_done(struct request *rq) pci_unmap_page(h->pdev, temp64.val, cmd->SG[i].Len, ddir); } - complete_buffers(rq->bio, (rq->errors == 0)); - - if (blk_fs_request(rq)) { - const int rw = rq_data_dir(rq); - - disk_stat_add(rq->rq_disk, sectors[rw], rq->nr_sectors); - } - #ifdef CCISS_DEBUG printk("Done with %p\n", rq); #endif /* CCISS_DEBUG */ - add_disk_randomness(rq->rq_disk); + if (blk_end_request(rq, (rq->errors == 0) ? 0 : -EIO, blk_rq_bytes(rq))) + BUG(); + spin_lock_irqsave(&h->lock, flags); - end_that_request_last(rq, (rq->errors == 0)); cmd_free(h, cmd, 1); cciss_check_queues(h); spin_unlock_irqrestore(&h->lock, flags); @@ -2544,7 +2526,6 @@ static inline void complete_command(ctlr_info_t *h, CommandList_struct *cmd, } cmd->rq->data_len = 0; cmd->rq->completion_data = cmd; - blk_add_trace_rq(cmd->rq->q, cmd->rq, BLK_TA_COMPLETE); blk_complete_request(cmd->rq); }