From: Konrad Rzeszutek Wilk <konrad@darnok.org>
To: Andrew Jones <drjones@redhat.com>
Cc: jeremy@goop.org, xen-devel@lists.xensource.com,
konrad.wilk@oracle.com,
virtualization@lists.linux-foundation.org
Subject: Re: [Xen-devel] [PATCH] blkfront: don't put bdev right after getting it
Date: Thu, 16 Feb 2012 15:44:22 -0400 [thread overview]
Message-ID: <20120216194422.GA8023@andromeda.dapyr.net> (raw)
In-Reply-To: <1329394585-10129-1-git-send-email-drjones@redhat.com>
On Thu, Feb 16, 2012 at 01:16:25PM +0100, Andrew Jones wrote:
> We should hang onto bdev until we're done with it.
Looks ok. Is there a BZ that sparked this? Thanks.
>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
> drivers/block/xen-blkfront.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
> index 2f22874..5d45688 100644
> --- a/drivers/block/xen-blkfront.c
> +++ b/drivers/block/xen-blkfront.c
> @@ -1410,7 +1410,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
> mutex_lock(&blkfront_mutex);
>
> bdev = bdget_disk(disk, 0);
> - bdput(bdev);
>
> if (bdev->bd_openers)
> goto out;
> @@ -1441,6 +1440,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
> }
>
> out:
> + bdput(bdev);
> mutex_unlock(&blkfront_mutex);
> return 0;
> }
> --
> 1.7.7.5
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2012-02-16 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 12:16 [PATCH] blkfront: don't put bdev right after getting it Andrew Jones
2012-02-16 19:44 ` Konrad Rzeszutek Wilk [this message]
2012-02-17 12:03 ` [Xen-devel] " Andrew Jones
2012-02-21 14:58 ` Konrad Rzeszutek Wilk
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=20120216194422.GA8023@andromeda.dapyr.net \
--to=konrad@darnok.org \
--cc=drjones@redhat.com \
--cc=jeremy@goop.org \
--cc=konrad.wilk@oracle.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xensource.com \
/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