aboutsummaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-04-30 22:01:17 +0000
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:31:37 +0200
commit9897cb532382f075b337f7933b5a50f0ffc32d35 (patch)
tree9e8c94e27f2e7a773c6703b249f420bc1be3973d /drivers/block
parent89de1669ace055b56f1de1c9f5aca26dd7f17f25 (diff)
blkfront: Fix gendisk leak
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkfront.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 3258ae67ac7..62d32959095 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1029,6 +1029,9 @@ static void blkfront_closing(struct blkfront_info *info)
blk_cleanup_queue(info->rq);
info->rq = NULL;
+ put_disk(info->gd);
+ info->gd = NULL;
+
out:
if (info->xbdev)
xenbus_frontend_closed(info->xbdev);