diff options
author | Andrew Jones <drjones@redhat.com> | 2012-02-16 13:16:25 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-03-20 12:52:41 +0100 |
commit | dad5cf659b202b5070c8616b5c515f6ca4db0c42 (patch) | |
tree | 0ca624ebdcf62e2ddc7a25b749ba8f3c3c953bde /drivers/block | |
parent | 34ae2e47d97216d8c66a1c5dff5b530c29b746b8 (diff) | |
download | linux-dad5cf659b202b5070c8616b5c515f6ca4db0c42.tar.bz2 |
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 619868d91ca8..537cb722a211 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; } |