diff options
author | David S. Miller | 2008-02-23 20:38:20 -0800 |
---|---|---|
committer | David S. Miller | 2008-02-23 20:38:20 -0800 |
commit | 8d3c202be23c5a915f7053ebd4e96f44700c6a62 (patch) | |
tree | e0f017aff86d3ad0b858fe85f44e11096087ed00 /drivers/scsi/scsi_lib.c | |
parent | 1b04ab4597725f75f94942da9aa40daa7b9a4bd9 (diff) | |
parent | 038eb0ea04b245351be34b0ae76b55eee4603989 (diff) |
Merge branch 'master' of ../linux-2.6/
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 135c1d054701..ba21d97d1855 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1014,10 +1014,6 @@ static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer *sdb, } req->buffer = NULL; - if (blk_pc_request(req)) - sdb->length = req->data_len; - else - sdb->length = req->nr_sectors << 9; /* * Next, walk the list, and fill in the addresses and sizes of @@ -1026,6 +1022,10 @@ static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer *sdb, count = blk_rq_map_sg(req->q, req, sdb->table.sgl); BUG_ON(count > sdb->table.nents); sdb->table.nents = count; + if (blk_pc_request(req)) + sdb->length = req->data_len; + else + sdb->length = req->nr_sectors << 9; return BLKPREP_OK; } |