diff options
author | Paul Durrant <pdurrant@amazon.com> | 2019-12-02 12:41:17 +0100 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2019-12-04 11:35:35 +0100 |
commit | 14855954f63608c5622d5eaa964d3872ce5c5514 (patch) | |
tree | 47775d38e3f27c12a0464fc877ab9cf5195df050 /drivers/block/xen-blkback/blkback.c | |
parent | xen/xenbus: reference count registered modules (diff) | |
download | linux-14855954f63608c5622d5eaa964d3872ce5c5514.tar.xz linux-14855954f63608c5622d5eaa964d3872ce5c5514.zip |
xen-blkback: allow module to be cleanly unloaded
Add a module_exit() to perform the necessary clean-up.
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: "Roger Pau Monné" <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/block/xen-blkback/blkback.c')
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index fd1e19f1a49f..e562a7e20c3c 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c @@ -1504,5 +1504,13 @@ static int __init xen_blkif_init(void) module_init(xen_blkif_init); +static void __exit xen_blkif_fini(void) +{ + xen_blkif_xenbus_fini(); + xen_blkif_interface_fini(); +} + +module_exit(xen_blkif_fini); + MODULE_LICENSE("Dual BSD/GPL"); MODULE_ALIAS("xen-backend:vbd"); |