From: Bartlomiej Zolnierkiewicz Date: Tue, 31 Mar 2009 18:15:00 +0000 (+0200) Subject: ide-cd: use ide_end_rq() also for failed non-fs requests X-Git-Tag: firefly_0821_release~14993^2~51 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=bf12a9c1c95e1b0204fc2fc9fe625a056e284f5a;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Bartlomiej Zolnierkiewicz --- 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) 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); }