projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4942de4
)
cdrom_open() forgets to unlock on -EROFS failure exits
author
Al Viro
<viro@ftp.linux.org.uk>
Wed, 26 Sep 2007 06:20:44 +0000
(08:20 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Wed, 26 Sep 2007 06:20:44 +0000
(08:20 +0200)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
drivers/cdrom/cdrom.c
patch
|
blob
|
history
diff --git
a/drivers/cdrom/cdrom.c
b/drivers/cdrom/cdrom.c
index 67ee3d4b2878c1d2916dbc55f1d60757add33951..79245714f0a777430d459eb2a3c09aa7746410b4 100644
(file)
--- 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--;