|
@@ -986,6 +986,9 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, fmode_t
|
|
|
|
|
|
cdinfo(CD_OPEN, "entering cdrom_open\n");
|
|
|
|
|
|
+ /* open is event synchronization point, check events first */
|
|
|
+ check_disk_change(bdev);
|
|
|
+
|
|
|
/* if this was a O_NONBLOCK open and we should honor the flags,
|
|
|
* do a quick open without drive/disc integrity checks. */
|
|
|
cdi->use_count++;
|
|
@@ -1012,9 +1015,6 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, fmode_t
|
|
|
|
|
|
cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n",
|
|
|
cdi->name, cdi->use_count);
|
|
|
- /* Do this on open. Don't wait for mount, because they might
|
|
|
- not be mounting, but opening with O_NONBLOCK */
|
|
|
- check_disk_change(bdev);
|
|
|
return 0;
|
|
|
err_release:
|
|
|
if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
|