mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-24 19:45:06 +08:00
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
This commit is contained in:
commit
9a22e330e9
@ -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--;
|
||||
|
Loading…
Reference in New Issue
Block a user