aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkback/xenbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/xen-blkback/xenbus.c')
-rw-r--r--drivers/block/xen-blkback/xenbus.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c
index 3a8b810b4980..54f408963201 100644
--- a/drivers/block/xen-blkback/xenbus.c
+++ b/drivers/block/xen-blkback/xenbus.c
@@ -270,6 +270,9 @@ static int xen_blkif_disconnect(struct xen_blkif *blkif)
270 blkif->blk_rings.common.sring = NULL; 270 blkif->blk_rings.common.sring = NULL;
271 } 271 }
272 272
273 /* Remove all persistent grants and the cache of ballooned pages. */
274 xen_blkbk_free_caches(blkif);
275
273 return 0; 276 return 0;
274} 277}
275 278
@@ -281,9 +284,6 @@ static void xen_blkif_free(struct xen_blkif *blkif)
281 xen_blkif_disconnect(blkif); 284 xen_blkif_disconnect(blkif);
282 xen_vbd_free(&blkif->vbd); 285 xen_vbd_free(&blkif->vbd);
283 286
284 /* Remove all persistent grants and the cache of ballooned pages. */
285 xen_blkbk_free_caches(blkif);
286
287 /* Make sure everything is drained before shutting down */ 287 /* Make sure everything is drained before shutting down */
288 BUG_ON(blkif->persistent_gnt_c != 0); 288 BUG_ON(blkif->persistent_gnt_c != 0);
289 BUG_ON(atomic_read(&blkif->persistent_gnt_in_use) != 0); 289 BUG_ON(atomic_read(&blkif->persistent_gnt_in_use) != 0);