From: Jens Axboe <jens.axboe@oracle.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdrom_open() forgets to unlock on -EROFS failure exits
Date: Wed, 26 Sep 2007 08:19:26 +0200 [thread overview]
Message-ID: <20070926061926.GF2367@kernel.dk> (raw)
In-Reply-To: <E1IaLAU-00085M-9P@ZenIV.linux.org.uk>
On Wed, Sep 26 2007, Al Viro wrote:
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/cdrom/cdrom.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index 67ee3d4..7924571 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--;
> --
> 1.5.3.GIT
Looks good Al, applied.
--
Jens Axboe
prev parent reply other threads:[~2007-09-26 6:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 0:54 [PATCH] cdrom_open() forgets to unlock on -EROFS failure exits Al Viro
2007-09-26 6:19 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070926061926.GF2367@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox