xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andrew Jones <drjones@redhat.com>
Cc: jeremy@goop.org, xen-devel@lists.xensource.com,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] blkfront: don't put bdev right after getting it
Date: Tue, 21 Feb 2012 09:58:54 -0500	[thread overview]
Message-ID: <20120221145854.GB7390@phenom.dumpdata.com> (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.

applied in #testing
> 
> 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

      parent reply	other threads:[~2012-02-21 14:58 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 ` [Xen-devel] " Konrad Rzeszutek Wilk
2012-02-17 12:03   ` Andrew Jones
2012-02-21 14:58 ` Konrad Rzeszutek Wilk [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=20120221145854.GB7390@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=drjones@redhat.com \
    --cc=jeremy@goop.org \
    --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;
as well as URLs for NNTP newsgroup(s).