summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libata-core.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-18 13:21:24 -0400
committerJeff Garzik <jgarzik@pobox.com>2005-06-18 13:21:24 -0400
commitf9d1fe9630b94007902987c39d19f04dc6256eac (patch)
tree1fbe757adc72469ddbc3c1e4132392164b2e0271 /drivers/scsi/libata-core.c
parent54258a8a2e81b11e486068f1cfab9fe4746b8420 (diff)
parent9ee1c939d1cb936b1f98e8d81aeffab57bae46ab (diff)
downloadblackbird-obmc-linux-f9d1fe9630b94007902987c39d19f04dc6256eac.tar.gz
blackbird-obmc-linux-f9d1fe9630b94007902987c39d19f04dc6256eac.zip
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/scsi/libata-core.c')
-rw-r--r--drivers/scsi/libata-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 84c4770e5bb4..36b401fee1f1 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -2607,7 +2607,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes)
next_sg:
sg = &qc->sg[qc->cursg];
-next_page:
page = sg->page;
offset = sg->offset + qc->cursg_ofs;
@@ -2615,6 +2614,7 @@ next_page:
page = nth_page(page, (offset >> PAGE_SHIFT));
offset %= PAGE_SIZE;
+ /* don't overrun current sg */
count = min(sg->length - qc->cursg_ofs, bytes);
/* don't cross page boundaries */
@@ -2639,8 +2639,6 @@ next_page:
kunmap(page);
if (bytes) {
- if (qc->cursg_ofs < sg->length)
- goto next_page;
goto next_sg;
}
}
OpenPOWER on IntegriCloud