diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:43 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-27 12:46:43 +0100 |
commit | 6902a5331256e1b9f4cef95a1e3622252113b260 (patch) | |
tree | f33ef1a732425e1862fcf0bbd0e909f82d247a8a /drivers/ide/ide-eh.c | |
parent | ide: sanitize ide_end_rq() (diff) | |
download | linux-6902a5331256e1b9f4cef95a1e3622252113b260.tar.xz linux-6902a5331256e1b9f4cef95a1e3622252113b260.zip |
ide: pass error value to ide_complete_rq()
Set rq->errors at ide_complete_rq() call sites and then pass
error value to ide_complete_rq().
[ Some rq->errors assignments look really wrong but this patch
leaves them alone to not introduce too many changes at once. ]
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-eh.c')
-rw-r--r-- | drivers/ide/ide-eh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide-eh.c b/drivers/ide/ide-eh.c index f6e1a82a3cc5..d1385d332e94 100644 --- a/drivers/ide/ide-eh.c +++ b/drivers/ide/ide-eh.c @@ -123,17 +123,18 @@ ide_startstop_t ide_error(ide_drive_t *drive, const char *msg, u8 stat) /* retry only "normal" I/O: */ if (!blk_fs_request(rq)) { - rq->errors = 1; if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { struct ide_cmd *cmd = rq->special; if (cmd) ide_complete_cmd(drive, cmd, stat, err); } else if (blk_pm_request(rq)) { + rq->errors = 1; ide_complete_pm_rq(drive, rq); return ide_stopped; } - ide_complete_rq(drive, err); + rq->errors = err; + ide_complete_rq(drive, err ? -EIO : 0); return ide_stopped; } |