Skip to content

Commit

Permalink
ide-cd: fix leftover data BUG
Browse files Browse the repository at this point in the history
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: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Feb 1, 2008
1 parent 4eb166d commit 4f4f6c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4f4f6c2

Please sign in to comment.