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: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
上级 116e690f
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册