drbd: drbd_create_device(): Take a resource instead of a connection argument
authorAndreas Gruenbacher <agruen@linbit.com>
Wed, 6 Jul 2011 12:20:49 +0000 (14:20 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 17 Feb 2014 15:46:42 +0000 (16:46 +0100)
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_nl.c

index 21037bda905e715d3a77e49211e63d526d2ccc85..34ba7439abe119a3365e73822eadb021cfb8afce 100644 (file)
@@ -1239,7 +1239,7 @@ extern struct bio *bio_alloc_drbd(gfp_t gfp_mask);
 extern rwlock_t global_state_lock;
 
 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_delete_device(struct drbd_device *mdev);
 
index 522e103ce494f6367fbbccca85acf6c844d1f5e1..b00a8d74f6cb5d606472e14c600c399033dca889 100644 (file)
@@ -2659,9 +2659,9 @@ static int init_submitter(struct drbd_device *device)
        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_peer_device *peer_device;
        struct gendisk *disk;
index fde2d257eb86fd49bdd7b651b56a10c22315d5c4..2bac2d9efb0442aa0fd1abae874a8a20c3f140c7 100644 (file)
@@ -3348,7 +3348,7 @@ int drbd_adm_new_minor(struct sk_buff *skb, struct genl_info *info)
                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:
        drbd_adm_finish(info, retcode);
        return 0;
This page took 0.031387 seconds and 5 git commands to generate.