aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-26 08:58:13 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-26 08:58:13 -0700
commit9a22e330e9cbab8deab2db913a0d37bb99140ecb (patch)
treeda94fdd4e28ca0ac0548f54fdc00a077eca18d7f /drivers
parent4d3fac08718b49fc256bdb447a479d089ca97b78 (diff)
parentae3ba4fd966e38d8d766d19f7a58b551df8ecc97 (diff)
Merge branch 'trivial' of git://git.kernel.dk/data/git/linux-2.6-block
* 'trivial' of git://git.kernel.dk/data/git/linux-2.6-block: cdrom_open() forgets to unlock on -EROFS failure exits
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 67ee3d4b287..79245714f0a 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
check_disk_change(ip->i_bdev);
return 0;
err_release:
+ if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
+ cdi->ops->lock_door(cdi, 0);
+ cdinfo(CD_OPEN, "door unlocked.\n");
+ }
cdi->ops->release(cdi);
err:
cdi->use_count--;