From e9781fc34d7a17a49c4f901bcb4e82836f7ce508 Mon Sep 17 00:00:00 2001 From: Albert Lee Date: Mon, 6 Jun 2005 15:56:03 +0800 Subject: [PATCH] --- yaml --- r: 1927 b: refs/heads/master c: 6952df035509717bdc46194b2a3d6ffb9349f267 h: refs/heads/master i: 1925: 1b61b986c5a8a9f1c9e0c751fd37348da08f5c89 1923: 6d568f83e2289a5fe87994415fd641ab48b9519d 1919: ad4556a11030787e14084c53e76acdcb829a8be7 v: v3 --- [refs] | 2 +- trunk/drivers/scsi/libata-core.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 862134f4616d..6af99216f0f0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e1dd23a0012c3929737798fda9fede0e783f4ff3 +refs/heads/master: 6952df035509717bdc46194b2a3d6ffb9349f267 diff --git a/trunk/drivers/scsi/libata-core.c b/trunk/drivers/scsi/libata-core.c index 21d194c6ace3..9e58f134f68b 100644 --- a/trunk/drivers/scsi/libata-core.c +++ b/trunk/drivers/scsi/libata-core.c @@ -2577,7 +2577,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; @@ -2585,6 +2584,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) 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 */ @@ -2609,8 +2609,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) kunmap(page); if (bytes) { - if (qc->cursg_ofs < sg->length) - goto next_page; goto next_sg; } }