Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc1c56fde6dd1c85e2047c276456c07bd4508b5c
Commit:     bc1c56fde6dd1c85e2047c276456c07bd4508b5c
Parent:     66846572bfb4ec62bcba260028cbbcbdb77bd636
Author:     NeilBrown <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 16 13:31:30 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 09:25:56 2007 +0200

    Share code between init_request_from_bio and blk_rq_bio_prep
    
    These have very similar functions and should share code where
    possible.
    
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    
    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/ll_rw_blk.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index eb27b33..e0608c4 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2941,15 +2941,9 @@ static void init_request_from_bio(struct request *req, 
struct bio *bio)
 
        req->errors = 0;
        req->hard_sector = req->sector = bio->bi_sector;
-       req->hard_nr_sectors = req->nr_sectors = bio_sectors(bio);
-       req->current_nr_sectors = req->hard_cur_sectors = bio_cur_sectors(bio);
-       req->nr_phys_segments = bio_phys_segments(req->q, bio);
-       req->nr_hw_segments = bio_hw_segments(req->q, bio);
-       req->buffer = bio_data(bio);    /* see ->buffer comment above */
-       req->bio = req->biotail = bio;
        req->ioprio = bio_prio(bio);
-       req->rq_disk = bio->bi_bdev->bd_disk;
        req->start_time = jiffies;
+       blk_rq_bio_prep(req->q, req, bio);
 }
 
 static int __make_request(struct request_queue *q, struct bio *bio)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to