diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2014-11-10 19:21:09 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-11-10 19:27:30 +0300 |
commit | 179e20b8df97e0c7541a1bae30cad53ecc7a5e86 (patch) | |
tree | 09ba871446b543f9adf3c7468334053e3a2cab62 /drivers/block/drbd/drbd_main.c | |
parent | a64e6bb4db601b561f2d3a80dfc554ddfe73db74 (diff) | |
download | linux-179e20b8df97e0c7541a1bae30cad53ecc7a5e86.tar.xz |
drbd: Minor cleanups
. Update comments
. drbd_set_{in,out_of}_sync(): Remove unused parameters
. Move common code into adm_del_resource()
. Redefine ERR_MINOR_EXISTS -> ERR_MINOR_OR_VOLUME_EXISTS
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 973c185c9cfe..cce25a5eb157 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c @@ -2731,7 +2731,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig device = minor_to_device(minor); if (device) - return ERR_MINOR_EXISTS; + return ERR_MINOR_OR_VOLUME_EXISTS; /* GFP_KERNEL, we are outside of all write-out paths */ device = kzalloc(sizeof(struct drbd_device), GFP_KERNEL); @@ -2794,7 +2794,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig id = idr_alloc(&drbd_devices, device, minor, minor + 1, GFP_KERNEL); if (id < 0) { if (id == -ENOSPC) { - err = ERR_MINOR_EXISTS; + err = ERR_MINOR_OR_VOLUME_EXISTS; drbd_msg_put_info(adm_ctx->reply_skb, "requested minor exists already"); } goto out_no_minor_idr; @@ -2804,7 +2804,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig id = idr_alloc(&resource->devices, device, vnr, vnr + 1, GFP_KERNEL); if (id < 0) { if (id == -ENOSPC) { - err = ERR_MINOR_EXISTS; + err = ERR_MINOR_OR_VOLUME_EXISTS; drbd_msg_put_info(adm_ctx->reply_skb, "requested minor exists already"); } goto out_idr_remove_minor; |