From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] blkfront: don't put bdev right after getting it Date: Tue, 21 Feb 2012 09:58:54 -0500 Message-ID: <20120221145854.GB7390@phenom.dumpdata.com> References: <1329394585-10129-1-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1329394585-10129-1-git-send-email-drjones@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Andrew Jones Cc: jeremy@goop.org, xen-devel@lists.xensource.com, virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org 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 > --- > 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