summaryrefslogtreecommitdiffstats
path: root/xlators/lib/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/lib/src')
-rw-r--r--xlators/lib/src/libxlator.c15
-rw-r--r--xlators/lib/src/libxlator.h8
2 files changed, 13 insertions, 10 deletions
diff --git a/xlators/lib/src/libxlator.c b/xlators/lib/src/libxlator.c
index e1a22b60340..8075fa0c29f 100644
--- a/xlators/lib/src/libxlator.c
+++ b/xlators/lib/src/libxlator.c
@@ -7,7 +7,7 @@
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/mem-types.h>
+
#include "libxlator.h"
int marker_xtime_default_gauge[] = {
@@ -198,10 +198,11 @@ cluster_markerxtime_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
}
if (dict_get_ptr(dict, marker_xattr, (void **)&net_timebuf)) {
+ local->count[MCNT_NOTFOUND]++;
+ UNLOCK(&frame->lock);
gf_log(this->name, GF_LOG_WARNING,
"Unable to get <uuid>.xtime attr");
- local->count[MCNT_NOTFOUND]++;
- goto unlock;
+ goto post_unlock;
}
if (local->count[MCNT_FOUND]) {
@@ -221,7 +222,7 @@ cluster_markerxtime_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
}
unlock:
UNLOCK(&frame->lock);
-
+post_unlock:
if (callcnt == 0)
cluster_marker_unwind(frame, marker_xattr, local->net_timebuf, 8, dict);
@@ -266,17 +267,17 @@ cluster_markeruuid_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
goto unlock;
} else if (volmark->retval) {
GF_FREE(local->volmark);
- local->volmark = memdup(volmark, sizeof(*volmark));
+ local->volmark = gf_memdup(volmark, sizeof(*volmark));
local->retval = volmark->retval;
} else if ((volmark->sec > local->volmark->sec) ||
((volmark->sec == local->volmark->sec) &&
(volmark->usec >= local->volmark->usec))) {
GF_FREE(local->volmark);
- local->volmark = memdup(volmark, sizeof(*volmark));
+ local->volmark = gf_memdup(volmark, sizeof(*volmark));
}
} else {
- local->volmark = memdup(volmark, sizeof(*volmark));
+ local->volmark = gf_memdup(volmark, sizeof(*volmark));
VALIDATE_OR_GOTO(local->volmark, unlock);
gf_uuid_unparse(volmark->uuid, vol_uuid);
if (volmark->retval)
diff --git a/xlators/lib/src/libxlator.h b/xlators/lib/src/libxlator.h
index d17a1e21891..81da4060d55 100644
--- a/xlators/lib/src/libxlator.h
+++ b/xlators/lib/src/libxlator.h
@@ -10,10 +10,12 @@
#ifndef _LIBXLATOR_H
#define _LIBXLATOR_H
-#include <glusterfs/xlator.h>
-#include <glusterfs/logging.h>
#include <glusterfs/defaults.h>
-#include <glusterfs/common-utils.h>
+
+#include <stdint.h> // for int32_t
+#include "glusterfs/dict.h" // for dict_t, data_t
+#include "glusterfs/globals.h" // for xlator_t, loc_t
+#include "glusterfs/stack.h" // for call_frame_t
#include <glusterfs/compat.h>
#include <glusterfs/compat-errno.h>