summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2017-08-29 10:20:41 +0200
committerJens Axboe <axboe@kernel.dk>2017-08-29 23:34:45 +0200
commit3f1a1b7cbb94f5f61d55f5f8d7391a0d84824cca (patch)
treeae7cc1feea7ac7987f7038b5e41d346dac1f535c /drivers/block/drbd
parentdrbd: Use setup_timer() instead of init_timer() to simplify the code. (diff)
downloadlinux-3f1a1b7cbb94f5f61d55f5f8d7391a0d84824cca.tar.xz
linux-3f1a1b7cbb94f5f61d55f5f8d7391a0d84824cca.zip
drbd: fix rmmod cleanup, remove _all_ debugfs entries
If there are still resources defined, but "empty", no more volumes or connections configured, they don't hold module reference counts, so rmmod is possible. To avoid DRBD leftovers in debugfs, we need to call our global drbd_debugfs_cleanup() only after all resources have been cleaned up. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 056d9ab91c29..8b8dd82da3c4 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2420,7 +2420,6 @@ static void drbd_cleanup(void)
destroy_workqueue(retry.wq);
drbd_genl_unregister();
- drbd_debugfs_cleanup();
idr_for_each_entry(&drbd_devices, device, i)
drbd_delete_device(device);
@@ -2431,6 +2430,8 @@ static void drbd_cleanup(void)
drbd_free_resource(resource);
}
+ drbd_debugfs_cleanup();
+
drbd_destroy_mempools();
unregister_blkdev(DRBD_MAJOR, "drbd");