summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mgmt.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-replace-brick.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rpc-ops.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c4
7 files changed, 18 insertions, 19 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
index 5b7d782a1e6..a924dd3425b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mgmt.c
@@ -2180,7 +2180,7 @@ glusterd_mgmt_v3_initiate_all_phases (rpcsvc_request_t *req, glusterd_op_t op,
/* Save the MY_UUID as the originator_uuid. This originator_uuid
* will be used by is_origin_glusterd() to determine if a node
* is the originator node for a command. */
- originator_uuid = GF_CALLOC (1, sizeof(uuid_t),
+ originator_uuid = GF_MALLOC (sizeof(uuid_t),
gf_common_mt_uuid_t);
if (!originator_uuid) {
ret = -1;
@@ -2416,7 +2416,7 @@ glusterd_mgmt_v3_initiate_snap_phases (rpcsvc_request_t *req, glusterd_op_t op,
/* Save the MY_UUID as the originator_uuid. This originator_uuid
* will be used by is_origin_glusterd() to determine if a node
* is the originator node for a command. */
- originator_uuid = GF_CALLOC (1, sizeof(uuid_t),
+ originator_uuid = GF_MALLOC (sizeof(uuid_t),
gf_common_mt_uuid_t);
if (!originator_uuid) {
ret = -1;
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index cd2c364464d..551672c1d74 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -189,7 +189,7 @@ glusterd_generate_txn_id (dict_t *dict, uuid_t **txn_id)
GF_ASSERT (priv);
GF_ASSERT (dict);
- *txn_id = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ *txn_id = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!*txn_id)
goto out;
@@ -1421,8 +1421,7 @@ glusterd_op_stage_set_volume (dict_t *dict, char **op_errstr)
if (!gf_uuid_compare (brickinfo->uuid, MY_UUID)) {
trash_path_len = strlen (value) +
strlen (brickinfo->path) + 2;
- trash_path = GF_CALLOC (1,
- trash_path_len,
+ trash_path = GF_MALLOC (trash_path_len,
gf_common_mt_char);
snprintf (trash_path, trash_path_len,
"%s/%s", brickinfo->path,
@@ -5889,7 +5888,7 @@ glusterd_op_ac_stage_op (glusterd_op_sm_event_t *event, void *ctx)
status);
}
- txn_id = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ txn_id = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (txn_id)
gf_uuid_copy (*txn_id, event->txn_id);
@@ -6010,7 +6009,7 @@ glusterd_op_ac_commit_op (glusterd_op_sm_event_t *event, void *ctx)
"'Volume %s' failed: %d", gd_op_list[req_ctx->op],
status);
- txn_id = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ txn_id = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (txn_id)
gf_uuid_copy (*txn_id, event->txn_id);
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
index de8663fdcb4..c3c7d7230d7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
+++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c
@@ -604,7 +604,7 @@ glusterd_mgmt_v3_initiate_replace_brick_cmd_phases (rpcsvc_request_t *req,
GF_ASSERT (conf);
txn_generation = conf->generation;
- originator_uuid = GF_CALLOC (1, sizeof(uuid_t),
+ originator_uuid = GF_MALLOC (sizeof(uuid_t),
gf_common_mt_uuid_t);
if (!originator_uuid) {
ret = -1;
diff --git a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
index fc859c00a9d..be5979cf858 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rpc-ops.c
@@ -1829,7 +1829,7 @@ glusterd_mgmt_v3_lock_peers (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- frame->cookie = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ frame->cookie = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!frame->cookie) {
ret = -1;
goto out;
@@ -1910,7 +1910,7 @@ glusterd_mgmt_v3_unlock_peers (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- frame->cookie = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ frame->cookie = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!frame->cookie) {
ret = -1;
goto out;
@@ -2033,7 +2033,7 @@ glusterd_stage_op (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- frame->cookie = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ frame->cookie = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!frame->cookie) {
ret = -1;
goto out;
@@ -2114,7 +2114,7 @@ glusterd_commit_op (call_frame_t *frame, xlator_t *this,
ret = -1;
goto out;
}
- frame->cookie = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ frame->cookie = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!frame->cookie) {
ret = -1;
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 1f292ae405c..5d0e15ade02 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -4160,7 +4160,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_ptr = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ uuid_ptr = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!uuid_ptr) {
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
GD_MSG_NO_MEMORY, "Out Of Memory");
@@ -4213,7 +4213,7 @@ glusterd_handle_snapshot_create (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_ptr = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ uuid_ptr = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!uuid_ptr) {
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
GD_MSG_NO_MEMORY, "Out Of Memory");
@@ -4359,7 +4359,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_ptr = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ uuid_ptr = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!uuid_ptr) {
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
GD_MSG_NO_MEMORY, "Out Of Memory");
@@ -4411,7 +4411,7 @@ glusterd_handle_snapshot_clone (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- uuid_ptr = GF_CALLOC (1, sizeof(uuid_t), gf_common_mt_uuid_t);
+ uuid_ptr = GF_MALLOC (sizeof(uuid_t), gf_common_mt_uuid_t);
if (!uuid_ptr) {
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
GD_MSG_NO_MEMORY, "Out Of Memory");
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.h b/xlators/mgmt/glusterd/src/glusterd-syncop.h
index 6c5fbf965e6..e5f3aa6304c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.h
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.h
@@ -40,7 +40,7 @@
} while (0)
#define GD_ALLOC_COPY_UUID(dst_ptr, uuid, ret) do { \
- dst_ptr = GF_CALLOC (1, sizeof (*dst_ptr), gf_common_mt_uuid_t); \
+ dst_ptr = GF_MALLOC (sizeof (*dst_ptr), gf_common_mt_uuid_t); \
if (dst_ptr) { \
gf_uuid_copy (*dst_ptr, uuid); \
ret = 0; \
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 51c81db2f35..612fa35f90b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -9685,7 +9685,7 @@ glusterd_append_status_dicts (dict_t *dst, dict_t *src)
if (ret)
goto out;
- dst_sts_val = GF_CALLOC (1, sizeof(gf_gsync_status_t),
+ dst_sts_val = GF_MALLOC (sizeof(gf_gsync_status_t),
gf_common_mt_gsync_status_t);
if (!dst_sts_val) {
gf_msg ("glusterd", GF_LOG_ERROR, ENOMEM,
@@ -12194,7 +12194,7 @@ glusterd_set_originator_uuid (dict_t *dict)
GF_ASSERT (dict);
- originator_uuid = GF_CALLOC (1, sizeof(uuid_t),
+ originator_uuid = GF_MALLOC (sizeof(uuid_t),
gf_common_mt_uuid_t);
if (!originator_uuid) {
ret = -1;