提交 4f4f6c25 编写于 作者: J Jens Axboe

ide-cd: fix leftover data BUG

It's perfectly legal to have data leftovers when a drive signals
completion, it happens all the time when a user issues a command
with a transfer count that is too large.
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 4eb166d9
......@@ -1722,7 +1722,7 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
*/
if ((stat & DRQ_STAT) == 0) {
spin_lock_irqsave(&ide_lock, flags);
if (__blk_end_request(rq, 0, 0))
if (__blk_end_request(rq, 0, rq->data_len))
BUG();
HWGROUP(drive)->rq = NULL;
spin_unlock_irqrestore(&ide_lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册