aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:00 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:00 -0400
commitbf12a9c1c95e1b0204fc2fc9fe625a056e284f5a (patch)
tree90ed96211a84a302b269d1dfdfb96eba56bccbf2 /drivers
parent116e690f4e69ce0458a9be7010c80b59eb7a99d8 (diff)
ide-cd: use ide_end_rq() also for failed non-fs requests
Use ide_end_rq() also for failed non-fs requests on completion of REQUEST SENSE requests + use blk_rq_bytes() while at it. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-cd.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index a71ca2a9ab4b..6f64fb2f63d0 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -265,18 +265,10 @@ static void cdrom_end_request(ide_drive_t *drive, int uptodate)
265 failed->sense_len = rq->sense_len; 265 failed->sense_len = rq->sense_len;
266 } 266 }
267 cdrom_analyze_sense_data(drive, failed, sense); 267 cdrom_analyze_sense_data(drive, failed, sense);
268 /* 268
269 * now end the failed request 269 if (ide_end_rq(drive, failed, -EIO,
270 */ 270 blk_rq_bytes(failed)))
271 if (blk_fs_request(failed)) { 271 BUG();
272 if (ide_end_rq(drive, failed, -EIO,
273 failed->hard_nr_sectors << 9))
274 BUG();
275 } else {
276 if (blk_end_request(failed, -EIO,
277 failed->data_len))
278 BUG();
279 }
280 } else 272 } else
281 cdrom_analyze_sense_data(drive, NULL, sense); 273 cdrom_analyze_sense_data(drive, NULL, sense);
282 } 274 }