diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-06-09 01:40:48 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:44:57 +0100 |
commit | 803ea1348e412a1e35cfbb891f4514b74e7af460 (patch) | |
tree | d0a5b65f6550475e060742656035a018c148982f /drivers/block/drbd/drbd_nl.c | |
parent | drbd: Minor cleanup in conn_new_minor() (diff) | |
download | linux-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.c | 7 |
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; |