summaryrefslogtreecommitdiff
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@suse.com>2012-04-05 15:04:52 (GMT)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2012-05-11 20:11:54 (GMT)
commit8605067fb9b8e34aecf44ec258657c9cc009fc5a (patch)
tree5c646866a1ef241674600764158c9eb340a5d543 /drivers/block/xen-blkfront.c
parente77c78c02290c27925f67cd35b497e99ee0d6fe1 (diff)
downloadlinux-fsl-qoriq-8605067fb9b8e34aecf44ec258657c9cc009fc5a.tar.xz
xen-blkfront: module exit handling adjustments
The blkdev major must be released upon exit, or else the module can't attach to devices using the same majors upon being loaded again. Also avoid leaking the minor tracking bitmap. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 4f2b460..60eed4b 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1500,7 +1500,9 @@ module_init(xlblk_init);
static void __exit xlblk_exit(void)
{
- return xenbus_unregister_driver(&blkfront_driver);
+ xenbus_unregister_driver(&blkfront_driver);
+ unregister_blkdev(XENVBD_MAJOR, DEV_NAME);
+ kfree(minors);
}
module_exit(xlblk_exit);