diff options
Diffstat (limited to 'api/src/glfs-master.c')
-rw-r--r-- | api/src/glfs-master.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/api/src/glfs-master.c b/api/src/glfs-master.c index 09a92b7f060..c02534c188f 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; } |