drbd: Refcounting for mdev objects
Preparing removal of drbd_cfg_rwsem
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 3f377e2..8bc604e 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -867,6 +867,7 @@
struct drbd_conf {
struct drbd_tconn *tconn;
int vnr; /* volume number within the connection */
+ struct kref kref;
/* things that are stored as / read from meta data on disk */
unsigned long flags;
@@ -1373,7 +1374,7 @@
extern int conn_lowest_minor(struct drbd_tconn *tconn);
enum drbd_ret_code conn_new_minor(struct drbd_tconn *tconn, unsigned int minor, int vnr);
-extern void drbd_delete_device(struct drbd_conf *mdev);
+extern void drbd_minor_destroy(struct kref *kref);
struct drbd_tconn *conn_create(const char *name);
extern void conn_destroy(struct kref *kref);