mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Lars Ellenberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
be7445a381
commit
3f1a1b7cbb
1 changed files with 2 additions and 1 deletions
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue