diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-02 22:19:25 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@kiwi.transmeta.com> | 2002-09-02 22:19:25 -0700 |
| commit | d0d87c2ca3b5b89c49179572701eca7fca3841e9 (patch) | |
| tree | 337ff016986d3791249fdda1eb255adcb0f505ec | |
| parent | 012cc981b71f3a79081f2db6609461c9ec986604 (diff) | |
| parent | 404c384ff45b3688974e4aa8078d9ca308874d3e (diff) | |
Merge kiwi:v2.5/linux into home.transmeta.com:/home/torvalds/v2.5/linux
| -rw-r--r-- | drivers/block/floppy.c | 28 | ||||
| -rw-r--r-- | drivers/block/ll_rw_blk.c | 8 |
2 files changed, 8 insertions, 28 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 0e222083baa5..aa262a8ce867 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -2295,16 +2295,15 @@ static inline void end_request(struct request *req, int uptodate) { kdev_t dev = req->rq_dev; - if (end_that_request_first(req, uptodate, req->hard_cur_sectors)) + if (end_that_request_first(req, uptodate, current_count_sectors)) return; add_blkdev_randomness(major(dev)); floppy_off(DEVICE_NR(dev)); blkdev_dequeue_request(req); end_that_request_last(req); - /* Get the next request */ - req = elv_next_request(QUEUE); - CURRENT = req; + /* We're done with the request */ + CURRENT = NULL; } @@ -2335,27 +2334,8 @@ static void request_done(int uptodate) /* unlock chained buffers */ spin_lock_irqsave(q->queue_lock, flags); - while (current_count_sectors && CURRENT && - current_count_sectors >= req->current_nr_sectors){ - current_count_sectors -= req->current_nr_sectors; - req->nr_sectors -= req->current_nr_sectors; - req->sector += req->current_nr_sectors; - end_request(req, 1); - } + end_request(req, 1); spin_unlock_irqrestore(q->queue_lock, flags); - - if (current_count_sectors && CURRENT) { - /* "unlock" last subsector */ - req->buffer += current_count_sectors <<9; - req->current_nr_sectors -= current_count_sectors; - req->nr_sectors -= current_count_sectors; - req->sector += current_count_sectors; - return; - } - - if (current_count_sectors && !CURRENT) - DPRINT("request list destroyed in floppy request done\n"); - } else { if (rq_data_dir(req) == WRITE) { /* record write error information */ diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 79c8f46da27c..000f8e5ce65d 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c @@ -1992,11 +1992,11 @@ int end_that_request_first(struct request *req, int uptodate, int nr_sectors) * not a complete bvec done */ if (unlikely(nsect > nr_sectors)) { - int residual = (nsect - nr_sectors) << 9; + int partial = nr_sectors << 9; - bio->bi_size -= residual; - bio_iovec(bio)->bv_offset += residual; - bio_iovec(bio)->bv_len -= residual; + bio->bi_size -= partial; + bio_iovec(bio)->bv_offset += partial; + bio_iovec(bio)->bv_len -= partial; blk_recalc_rq_sectors(req, nr_sectors); blk_recalc_rq_segments(req); return 1; |
