summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r--drivers/block/drbd/drbd_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 86fd4c82900..f298f9c2dbd 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2266,8 +2266,10 @@ static void drbd_cleanup(void)
drbd_genl_unregister();
+ down_write(&drbd_cfg_rwsem);
idr_for_each_entry(&minors, mdev, i)
drbd_delete_device(mdev);
+ up_write(&drbd_cfg_rwsem);
drbd_destroy_mempools();
unregister_blkdev(DRBD_MAJOR, "drbd");