Commit 4e6e2877 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] ide-cd capacity fix

Only allow get_last_written() to override get_capacity(), if it is
bigger.
parent 62e160b5
......@@ -2372,7 +2372,7 @@ static int cdrom_read_toc(ide_drive_t *drive, struct request_sense *sense)
/* Now try to get the total cdrom capacity. */
stat = cdrom_get_last_written(cdi, &last_written);
if (!stat && last_written) {
if (!stat && (last_written > toc->capacity)) {
toc->capacity = last_written;
set_capacity(drive->disk, toc->capacity * sectors_per_frame);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment