diff options
author | Andrew Jones <drjones@redhat.com> | 2012-02-16 12:16:25 (GMT) |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-20 11:52:41 (GMT) |
commit | dad5cf659b202b5070c8616b5c515f6ca4db0c42 (patch) | |
tree | 0ca624ebdcf62e2ddc7a25b749ba8f3c3c953bde /drivers/block | |
parent | 34ae2e47d97216d8c66a1c5dff5b530c29b746b8 (diff) | |
download | linux-fsl-qoriq-dad5cf659b202b5070c8616b5c515f6ca4db0c42.tar.xz |
xen/blkfront: don't put bdev right after getting it
We should hang onto bdev until we're done with it.
Signed-off-by: Andrew Jones <drjones@redhat.com>
[v1: Fixed up git commit description]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | 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 619868d..537cb72 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1409,7 +1409,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; @@ -1440,6 +1439,7 @@ static int blkif_release(struct gendisk *disk, fmode_t mode) } out: + bdput(bdev); mutex_unlock(&blkfront_mutex); return 0; } |