Commit 9f4fe9ad authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: Replace vnr_to_mdev() with conn_peer_device()

The new function returns a peer device, which allows us to eliminate a few
instances of first_peer_device().
Signed-off-by: default avatarAndreas Gruenbacher <agruen@linbit.com>
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
parent 79a3c8d3
......@@ -856,14 +856,6 @@ static inline unsigned int device_to_minor(struct drbd_device *device)
return device->minor;
}
static inline struct drbd_device *vnr_to_device(struct drbd_connection *connection, int vnr)
{
struct drbd_peer_device *peer_device;
peer_device = idr_find(&connection->peer_devices, vnr);
return peer_device ? peer_device->device : NULL;
}
/*
* function declarations
*************************/
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment