aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/cdrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r--drivers/cdrom/cdrom.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 514dd8efaf73..75fb965b8f72 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -986,6 +986,9 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, fmode_t
986 986
987 cdinfo(CD_OPEN, "entering cdrom_open\n"); 987 cdinfo(CD_OPEN, "entering cdrom_open\n");
988 988
989 /* open is event synchronization point, check events first */
990 check_disk_change(bdev);
991
989 /* if this was a O_NONBLOCK open and we should honor the flags, 992 /* if this was a O_NONBLOCK open and we should honor the flags,
990 * do a quick open without drive/disc integrity checks. */ 993 * do a quick open without drive/disc integrity checks. */
991 cdi->use_count++; 994 cdi->use_count++;
@@ -1012,9 +1015,6 @@ int cdrom_open(struct cdrom_device_info *cdi, struct block_device *bdev, fmode_t
1012 1015
1013 cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n", 1016 cdinfo(CD_OPEN, "Use count for \"/dev/%s\" now %d\n",
1014 cdi->name, cdi->use_count); 1017 cdi->name, cdi->use_count);
1015 /* Do this on open. Don't wait for mount, because they might
1016 not be mounting, but opening with O_NONBLOCK */
1017 check_disk_change(bdev);
1018 return 0; 1018 return 0;
1019err_release: 1019err_release:
1020 if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) { 1020 if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {