summaryrefslogtreecommitdiff
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index a2e8977abaad..605d92e3cc6b 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -942,11 +942,11 @@ static void blkfront_closing(struct xenbus_device *dev)
/* Flush gnttab callback work. Must be done with no locks held. */
flush_scheduled_work();
+ del_gendisk(info->gd);
+
blk_cleanup_queue(info->rq);
info->rq = NULL;
- del_gendisk(info->gd);
-
out:
xenbus_frontend_closed(dev);
}