Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2985259b0e3928d4cd0723ac5aad0d1190ab7717
Commit:     2985259b0e3928d4cd0723ac5aad0d1190ab7717
Parent:     a52de245ef0b6217a56fb2472ff65c3a196cafd5
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 19 08:27:31 2006 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Tue Dec 19 08:27:31 2006 +0100

    [PATCH] ->nr_sectors and ->hard_nr_sectors are not used for BLOCK_PC 
requests
    
    It's a file system thing, for block requests the only size used in the
    io paths is ->data_len as it is in bytes, not sectors.
    
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/ll_rw_blk.c       |    6 ++----
 drivers/scsi/scsi_lib.c |    2 --
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 79807db..71a78a7 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -2350,12 +2350,12 @@ static int __blk_rq_map_user(request_queue_t *q, struct 
request *rq,
        else
                bio = bio_copy_user(q, uaddr, len, reading);
 
-       if (IS_ERR(bio)) {
+       if (IS_ERR(bio))
                return PTR_ERR(bio);
-       }
 
        orig_bio = bio;
        blk_queue_bounce(q, &bio);
+
        /*
         * We link the bounce buffer in and could have to traverse it
         * later so we have to get a ref to prevent it from being freed
@@ -2379,8 +2379,6 @@ static int __blk_rq_map_user(request_queue_t *q, struct 
request *rq,
                rq->biotail->bi_next = bio;
                rq->biotail = bio;
 
-               rq->nr_sectors += bio_sectors(bio);
-               rq->hard_nr_sectors = rq->nr_sectors;
                rq->data_len += bio->bi_size;
        }
        spin_unlock_irq(q->queue_lock);
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1748e27..41a2ea3 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -270,8 +270,6 @@ static int scsi_merge_bio(struct request *rq, struct bio 
*bio)
        else {
                rq->biotail->bi_next = bio;
                rq->biotail = bio;
-               rq->hard_nr_sectors += bio_sectors(bio);
-               rq->nr_sectors = rq->hard_nr_sectors;
        }
 
        return 0;
-
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