summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ha/src/ha-helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/ha/src/ha-helpers.c')
-rw-r--r--xlators/cluster/ha/src/ha-helpers.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/xlators/cluster/ha/src/ha-helpers.c b/xlators/cluster/ha/src/ha-helpers.c
index c23c5676c..19be1ed27 100644
--- a/xlators/cluster/ha/src/ha-helpers.c
+++ b/xlators/cluster/ha/src/ha-helpers.c
@@ -1,22 +1,12 @@
/*
- Copyright (c) 2008-2009 Gluster, Inc. <http://www.gluster.com>
- This file is part of GlusterFS.
-
- GlusterFS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3 of the License,
- or (at your option) any later version.
-
- GlusterFS is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see
- <http://www.gnu.org/licenses/>.
-*/
+ Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com>
+ This file is part of GlusterFS.
+ This file is licensed to you under your choice of the GNU Lesser
+ General Public License, version 3 or any later version (LGPLv3 or
+ later), or the GNU General Public License, version 2 (GPLv2), in all
+ cases as published by the Free Software Foundation.
+*/
#include "xlator.h"
#include "call-stub.h"
#include "defaults.h"
@@ -49,12 +39,14 @@ int ha_alloc_init_fd (call_frame_t *frame, fd_t *fd)
goto out;
}
hafdp = (hafd_t *)(long)tmp_hafdp;
- local = frame->local = CALLOC (1, sizeof (*local));
+ local = frame->local = GF_CALLOC (1, sizeof (*local),
+ gf_ha_mt_ha_local_t);
if (local == NULL) {
ret = -ENOMEM;
goto out;
}
- local->state = CALLOC (1, child_count);
+ local->state = GF_CALLOC (1, child_count,
+ gf_ha_mt_child_count);
if (local->state == NULL) {
ret = -ENOMEM;
goto out;
@@ -147,7 +139,7 @@ int ha_handle_cbk (call_frame_t *frame, void *cookie, int op_ret, int op_errno)
}
if (local->fd) {
- FREE (local->state);
+ GF_FREE (local->state);
local->state = NULL;
fd_unref (local->fd);
@@ -170,7 +162,8 @@ int ha_alloc_init_inode (call_frame_t *frame, inode_t *inode)
local = frame->local;
if (local == NULL) {
- local = frame->local = CALLOC (1, sizeof (*local));
+ local = frame->local = GF_CALLOC (1, sizeof (*local),
+ gf_ha_mt_ha_local_t);
if (local == NULL) {
ret = -ENOMEM;
goto out;