summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 7094f1ef5..6db27e9a4 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -460,12 +460,12 @@ xlator_mem_acct_init (xlator_t *xl, int num_types)
int i = 0;
int ret = 0;
- if (!gf_mem_acct_is_enabled ())
- return 0;
-
if (!xl)
return -1;
+ if (!xl->ctx->mem_acct_enable)
+ return 0;
+
xl->mem_acct.num_types = num_types;
xl->mem_acct.rec = CALLOC(num_types, sizeof(struct mem_acct_rec));