summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-06-09 01:40:48 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 16:44:57 +0100
commit803ea1348e412a1e35cfbb891f4514b74e7af460 (patch)
treed0a5b65f6550475e060742656035a018c148982f /drivers/block/drbd/drbd_nl.c
parentdrbd: Minor cleanup in conn_new_minor() (diff)
downloadlinux-803ea1348e412a1e35cfbb891f4514b74e7af460.tar.xz
linux-803ea1348e412a1e35cfbb891f4514b74e7af460.zip
drbd: Add struct drbd_resource->devices
This allows to access the volumes of a resource by number. Signed-off-by: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index f563feb479b7..bbd63e9f51d8 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -3324,12 +3324,7 @@ static enum drbd_ret_code adm_del_minor(struct drbd_device *device)
device->state.role == R_SECONDARY) {
_drbd_request_state(device, NS(conn, C_WF_REPORT_PARAMS),
CS_VERBOSE + CS_WAIT_COMPLETE);
- idr_remove(&first_peer_device(device)->connection->volumes, device->vnr);
- idr_remove(&drbd_devices, device_to_minor(device));
- destroy_workqueue(device->submit.wq);
- del_gendisk(device->vdisk);
- synchronize_rcu();
- kref_put(&device->kref, drbd_destroy_device);
+ drbd_delete_minor(device);
return NO_ERROR;
} else
return ERR_MINOR_CONFIGURED;