summaryrefslogtreecommitdiff
path: root/drivers/cdrom/gdrom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cdrom/gdrom.c')
-rw-r--r--drivers/cdrom/gdrom.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 6495b03f576c..ae3a7537cf0f 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -497,6 +497,9 @@ static const struct cdrom_device_ops gdrom_ops = {
static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode)
{
int ret;
+
+ check_disk_change(bdev);
+
mutex_lock(&gdrom_mutex);
ret = cdrom_open(gd.cd_info, bdev, mode);
mutex_unlock(&gdrom_mutex);