ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Monday, June 29, 2009 - 8:59 pm

Gitweb:     http://git.kernel.org/linus/789547508f22e482825f52f813b59680408ec2c7
Commit:     789547508f22e482825f52f813b59680408ec2c7
Parent:     d7e2f36d9a92284754ed5254562766cb3d61c7ca
Author:     Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
AuthorDate: Tue Jun 23 11:26:06 2009 +0000
Committer:  David S. Miller <davem@davemloft.net>
CommitDate: Thu Jun 25 23:57:14 2009 -0700

    ide: fix ide_kill_rq() for special ide-{floppy,tape} driver requests
    
    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>
---
 drivers/ide/ide-io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 93b7886..95db5f0 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
ide: fix ide_kill_rq() for special ide-{floppy,tape} drive ..., Linux Kernel Mailing ..., (Mon Jun 29, 8:59 pm)