]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ide-cd invalidate toc cache on last close
authorJens Axboe <axboe@suse.de>
Sun, 8 Feb 2004 02:52:09 +0000 (18:52 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 8 Feb 2004 02:52:09 +0000 (18:52 -0800)
Make sure that TOC gets reloaded after every last close of the device.

drivers/ide/ide-cd.c

index 6aaf3bb8ad054029efafa48f5ea429a57df082be..580da53b1b177dd2622600ab65e78c2eaa686348 100644 (file)
@@ -2860,6 +2860,10 @@ int ide_cdrom_open_real (struct cdrom_device_info *cdi, int purpose)
 static
 void ide_cdrom_release_real (struct cdrom_device_info *cdi)
 {
+       ide_drive_t *drive = cdi->handle;
+
+       if (!cdi->use_count)
+               CDROM_STATE_FLAGS(drive)->toc_valid = 0;
 }