Commit 59515a2e authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Philipp Reisner

drbd: drbd_create_device(): Take a resource instead of a connection argument

Signed-off-by: default avatarAndreas Gruenbacher <agruen@linbit.com>
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
parent 5c661042
...@@ -1239,7 +1239,7 @@ extern struct bio *bio_alloc_drbd(gfp_t gfp_mask); ...@@ -1239,7 +1239,7 @@ extern struct bio *bio_alloc_drbd(gfp_t gfp_mask);
extern rwlock_t global_state_lock; extern rwlock_t global_state_lock;
extern int conn_lowest_minor(struct drbd_connection *connection); extern int conn_lowest_minor(struct drbd_connection *connection);
enum drbd_ret_code drbd_create_device(struct drbd_connection *connection, unsigned int minor, int vnr); enum drbd_ret_code drbd_create_device(struct drbd_resource *resource, unsigned int minor, int vnr);
extern void drbd_destroy_device(struct kref *kref); extern void drbd_destroy_device(struct kref *kref);
extern void drbd_delete_device(struct drbd_device *mdev); extern void drbd_delete_device(struct drbd_device *mdev);
......
...@@ -2659,9 +2659,9 @@ static int init_submitter(struct drbd_device *device) ...@@ -2659,9 +2659,9 @@ static int init_submitter(struct drbd_device *device)
return 0; return 0;
} }
enum drbd_ret_code drbd_create_device(struct drbd_connection *connection, unsigned int minor, int vnr) enum drbd_ret_code drbd_create_device(struct drbd_resource *resource, unsigned int minor, int vnr)
{ {
struct drbd_resource *resource = connection->resource; struct drbd_connection *connection = first_connection(resource);
struct drbd_device *device; struct drbd_device *device;
struct drbd_peer_device *peer_device; struct drbd_peer_device *peer_device;
struct gendisk *disk; struct gendisk *disk;
......
...@@ -3348,7 +3348,7 @@ int drbd_adm_new_minor(struct sk_buff *skb, struct genl_info *info) ...@@ -3348,7 +3348,7 @@ int drbd_adm_new_minor(struct sk_buff *skb, struct genl_info *info)
goto out; goto out;
} }
retcode = drbd_create_device(adm_ctx.connection, dh->minor, adm_ctx.volume); retcode = drbd_create_device(adm_ctx.resource, dh->minor, adm_ctx.volume);
out: out:
drbd_adm_finish(info, retcode); drbd_adm_finish(info, retcode);
return 0; return 0;
......
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