summaryrefslogtreecommitdiff
path: root/drivers/block/drbd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_bitmap.c2
-rw-r--r--drivers/block/drbd/drbd_main.c10
-rw-r--r--drivers/block/drbd/drbd_nl.c12
-rw-r--r--drivers/block/drbd/drbd_receiver.c6
4 files changed, 15 insertions, 15 deletions
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c
index 2735ddb58b91..65ea6ec66bfd 100644
--- a/drivers/block/drbd/drbd_bitmap.c
+++ b/drivers/block/drbd/drbd_bitmap.c
@@ -434,7 +434,7 @@ int drbd_bm_init(struct drbd_device *device)
{
struct drbd_bitmap *b = device->bitmap;
WARN_ON(b != NULL);
- b = kzalloc_obj(struct drbd_bitmap, GFP_KERNEL);
+ b = kzalloc_obj(struct drbd_bitmap);
if (!b)
return -ENOMEM;
spin_lock_init(&b->bm_lock);
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 64c545f5788c..b8f0eddf7e87 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2510,7 +2510,7 @@ struct drbd_resource *drbd_create_resource(const char *name)
{
struct drbd_resource *resource;
- resource = kzalloc_obj(struct drbd_resource, GFP_KERNEL);
+ resource = kzalloc_obj(struct drbd_resource);
if (!resource)
goto fail;
resource->name = kstrdup(name, GFP_KERNEL);
@@ -2543,7 +2543,7 @@ struct drbd_connection *conn_create(const char *name, struct res_opts *res_opts)
struct drbd_resource *resource;
struct drbd_connection *connection;
- connection = kzalloc_obj(struct drbd_connection, GFP_KERNEL);
+ connection = kzalloc_obj(struct drbd_connection);
if (!connection)
return NULL;
@@ -2552,7 +2552,7 @@ struct drbd_connection *conn_create(const char *name, struct res_opts *res_opts)
if (drbd_alloc_socket(&connection->meta))
goto fail;
- connection->current_epoch = kzalloc_obj(struct drbd_epoch, GFP_KERNEL);
+ connection->current_epoch = kzalloc_obj(struct drbd_epoch);
if (!connection->current_epoch)
goto fail;
@@ -2666,7 +2666,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
return ERR_MINOR_OR_VOLUME_EXISTS;
/* GFP_KERNEL, we are outside of all write-out paths */
- device = kzalloc_obj(struct drbd_device, GFP_KERNEL);
+ device = kzalloc_obj(struct drbd_device);
if (!device)
return ERR_NOMEM;
kref_init(&device->kref);
@@ -2725,7 +2725,7 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
INIT_LIST_HEAD(&device->peer_devices);
INIT_LIST_HEAD(&device->pending_bitmap_io);
for_each_connection(connection, resource) {
- peer_device = kzalloc_obj(struct drbd_peer_device, GFP_KERNEL);
+ peer_device = kzalloc_obj(struct drbd_peer_device);
if (!peer_device)
goto out_idr_remove_from_resource;
peer_device->connection = connection;
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fbeb8061e549..e201f0087a0f 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -1536,7 +1536,7 @@ int drbd_adm_disk_opts(struct sk_buff *skb, struct genl_info *info)
goto out;
}
- new_disk_conf = kmalloc_obj(struct disk_conf, GFP_KERNEL);
+ new_disk_conf = kmalloc_obj(struct disk_conf);
if (!new_disk_conf) {
retcode = ERR_NOMEM;
goto fail;
@@ -1785,14 +1785,14 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
atomic_set(&device->rs_pending_cnt, 0);
/* allocation not in the IO path, drbdsetup context */
- nbc = kzalloc_obj(struct drbd_backing_dev, GFP_KERNEL);
+ nbc = kzalloc_obj(struct drbd_backing_dev);
if (!nbc) {
retcode = ERR_NOMEM;
goto fail;
}
spin_lock_init(&nbc->md.uuid_lock);
- new_disk_conf = kzalloc_obj(struct disk_conf, GFP_KERNEL);
+ new_disk_conf = kzalloc_obj(struct disk_conf);
if (!new_disk_conf) {
retcode = ERR_NOMEM;
goto fail;
@@ -2390,7 +2390,7 @@ int drbd_adm_net_opts(struct sk_buff *skb, struct genl_info *info)
connection = adm_ctx.connection;
mutex_lock(&adm_ctx.resource->adm_mutex);
- new_net_conf = kzalloc_obj(struct net_conf, GFP_KERNEL);
+ new_net_conf = kzalloc_obj(struct net_conf);
if (!new_net_conf) {
retcode = ERR_NOMEM;
goto out;
@@ -2570,7 +2570,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
}
/* allocation not in the IO path, drbdsetup / netlink process context */
- new_net_conf = kzalloc_obj(*new_net_conf, GFP_KERNEL);
+ new_net_conf = kzalloc_obj(*new_net_conf);
if (!new_net_conf) {
retcode = ERR_NOMEM;
goto fail;
@@ -2840,7 +2840,7 @@ int drbd_adm_resize(struct sk_buff *skb, struct genl_info *info)
u_size = rcu_dereference(device->ldev->disk_conf)->disk_size;
rcu_read_unlock();
if (u_size != (sector_t)rs.resize_size) {
- new_disk_conf = kmalloc_obj(struct disk_conf, GFP_KERNEL);
+ new_disk_conf = kmalloc_obj(struct disk_conf);
if (!new_disk_conf) {
retcode = ERR_NOMEM;
goto fail_ldev;
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 2545f949ce45..c2dd784bc14b 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -3547,7 +3547,7 @@ static int receive_protocol(struct drbd_connection *connection, struct packet_in
}
}
- new_net_conf = kmalloc_obj(struct net_conf, GFP_KERNEL);
+ new_net_conf = kmalloc_obj(struct net_conf);
if (!new_net_conf)
goto disconnect;
@@ -3708,7 +3708,7 @@ static int receive_SyncParam(struct drbd_connection *connection, struct packet_i
mutex_lock(&connection->resource->conf_update);
old_net_conf = peer_device->connection->net_conf;
if (get_ldev(device)) {
- new_disk_conf = kzalloc_obj(struct disk_conf, GFP_KERNEL);
+ new_disk_conf = kzalloc_obj(struct disk_conf);
if (!new_disk_conf) {
put_ldev(device);
mutex_unlock(&connection->resource->conf_update);
@@ -3794,7 +3794,7 @@ static int receive_SyncParam(struct drbd_connection *connection, struct packet_i
}
if (verify_tfm || csums_tfm) {
- new_net_conf = kzalloc_obj(struct net_conf, GFP_KERNEL);
+ new_net_conf = kzalloc_obj(struct net_conf);
if (!new_net_conf)
goto disconnect;