summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-12 05:04:37 +0200
committerJeff Garzik <jeff@garzik.org>2006-06-12 05:04:37 +0200
commitfec69a97489f961026e24536dbb7b86ac663948c (patch)
tree869713470d81ebc261598489a2711960336c7c37 /drivers/scsi/scsi_lib.c
parent[PATCH] libata: add missing ->data_xfer for pdc_adma (diff)
parent[PATCH] sata_mv: grab host lock inside eng_timeout (diff)
downloadlinux-fec69a97489f961026e24536dbb7b86ac663948c.tar.xz
linux-fec69a97489f961026e24536dbb7b86ac663948c.zip
Merge branch 'upstream-fixes' into upstream
Conflicts: drivers/scsi/sata_sil24.c
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 18e34775b238..28befa7bb0e9 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -367,7 +367,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl,
int nsegs, unsigned bufflen, gfp_t gfp)
{
struct request_queue *q = rq->q;
- int nr_pages = (bufflen + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
unsigned int data_len = 0, len, bytes, off;
struct page *page;
struct bio *bio = NULL;