From 93c49c6e8c443426792b8e6cf24805516fdcc9bd Mon Sep 17 00:00:00 2001 From: Krutika Dhananjay Date: Wed, 23 Oct 2013 13:39:18 +0000 Subject: gfapi: fix mem-types initialisation ... and also fill the body of mem_acct_init(). Change-Id: I457d0629c20f999dd2f50e710c75b1c7575b6c19 BUG: 1021904 Signed-off-by: Krutika Dhananjay Reviewed-on: http://review.gluster.org/6134 Reviewed-by: Amar Tumballi Tested-by: Gluster Build System Reviewed-by: Anand Avati --- api/src/glfs-master.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'api/src/glfs-master.c') diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index 09a92b7f0..c02534c18 100644 --- a/api/src/glfs-master.c +++ b/api/src/glfs-master.c @@ -24,6 +24,7 @@ #include "glusterfs.h" #include "glfs-internal.h" +#include "glfs-mem-types.h" int @@ -114,6 +115,18 @@ notify (xlator_t *this, int event, void *data, ...) int mem_acct_init (xlator_t *this) { + int ret = -1; + + if (!this) + return ret; + + ret = xlator_mem_acct_init (this, glfs_mt_end + 1); + if (ret) { + gf_log (this->name, GF_LOG_ERROR, "Failed to initialise " + "memory accounting"); + return ret; + } + return 0; } -- cgit