Skip to content

Commit

Permalink
ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests
Browse files Browse the repository at this point in the history
Such requests should be failed with -EIO (like all other requests
in this function) instead of being completed successfully.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and David S. Miller committed Jun 26, 2009
1 parent d7e2f36 commit 7895475
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void ide_kill_rq(ide_drive_t *drive, struct request *rq)

if ((media == ide_floppy || media == ide_tape) && drv_req) {
rq->errors = 0;
ide_complete_rq(drive, 0, blk_rq_bytes(rq));
ide_complete_rq(drive, -EIO, blk_rq_bytes(rq));
} else {
if (media == ide_tape)
rq->errors = IDE_DRV_ERROR_GENERAL;
Expand Down

0 comments on commit 7895475

Please sign in to comment.