diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 20:15:00 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 20:15:00 +0200 |
commit | bf12a9c1c95e1b0204fc2fc9fe625a056e284f5a (patch) | |
tree | 90ed96211a84a302b269d1dfdfb96eba56bccbf2 /drivers/ide | |
parent | 116e690f4e69ce0458a9be7010c80b59eb7a99d8 (diff) | |
download | kernel_samsung_aries-bf12a9c1c95e1b0204fc2fc9fe625a056e284f5a.zip kernel_samsung_aries-bf12a9c1c95e1b0204fc2fc9fe625a056e284f5a.tar.gz kernel_samsung_aries-bf12a9c1c95e1b0204fc2fc9fe625a056e284f5a.tar.bz2 |
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/ide')
-rw-r--r-- | drivers/ide/ide-cd.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index a71ca2a..6f64fb2 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) failed->sense_len = rq->sense_len; } cdrom_analyze_sense_data(drive, failed, sense); - /* - * now end the failed request - */ - if (blk_fs_request(failed)) { - if (ide_end_rq(drive, failed, -EIO, - failed->hard_nr_sectors << 9)) - BUG(); - } else { - if (blk_end_request(failed, -EIO, - failed->data_len)) - BUG(); - } + + if (ide_end_rq(drive, failed, -EIO, + blk_rq_bytes(failed))) + BUG(); } else cdrom_analyze_sense_data(drive, NULL, sense); } |