aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:43 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 07:46:43 -0400
commit89f78b3261f7e331e41753ea2459fbb9b60a6f7a (patch)
treef294393d4d4a1db653c5f0ce7b5504ff589e4a3b /drivers/ide/ide-io.c
parent6902a5331256e1b9f4cef95a1e3622252113b260 (diff)
ide: move rq->errors quirk out from ide_end_request()
Move rq->errors quirk out from ide_end_request() to its call sites. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 4cc2bb13f1d6..28ac463dde1c 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -102,9 +102,6 @@ int ide_end_request (ide_drive_t *drive, int uptodate, int nr_sectors)
102 if (blk_noretry_request(rq) && uptodate <= 0) 102 if (blk_noretry_request(rq) && uptodate <= 0)
103 nr_bytes = rq->hard_nr_sectors << 9; 103 nr_bytes = rq->hard_nr_sectors << 9;
104 104
105 if (blk_fs_request(rq) == 0 && uptodate <= 0 && rq->errors == 0)
106 rq->errors = -EIO;
107
108 if (uptodate <= 0) 105 if (uptodate <= 0)
109 error = uptodate ? uptodate : -EIO; 106 error = uptodate ? uptodate : -EIO;
110 107
@@ -169,6 +166,8 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq)
169 } else { 166 } else {
170 if (media == ide_tape) 167 if (media == ide_tape)
171 rq->errors = IDE_DRV_ERROR_GENERAL; 168 rq->errors = IDE_DRV_ERROR_GENERAL;
169 else if (blk_fs_request(rq) == 0 && rq->errors == 0)
170 rq->errors = -EIO;
172 ide_end_request(drive, 0, 0); 171 ide_end_request(drive, 0, 0);
173 } 172 }
174} 173}