summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/inode.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-08-05 04:00:14 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-06 03:37:36 -0700
commitf9431f330e8f304e82d9b1443018987a926d56b6 (patch)
treee5f91f4f8f0cb9b3387f209944127022d915b598 /libglusterfs/src/inode.c
parent767b6b7d3f5b5e96e13f459fae6260d7cb129403 (diff)
mem pool for fd_t
Ran posix compliance test and sanity test Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
Diffstat (limited to 'libglusterfs/src/inode.c')
-rw-r--r--libglusterfs/src/inode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 5d35d4cc3..ad65081dc 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -1098,6 +1098,13 @@ inode_table_new (size_t lru_limit, xlator_t *xl)
return NULL;
}
+ new->fd_mem_pool = mem_pool_new (fd_t, 16384);
+
+ if (!new->fd_mem_pool) {
+ GF_FREE (new->inode_hash);
+ GF_FREE (new);
+ }
+
for (i=0; i<new->hashsize; i++) {
INIT_LIST_HEAD (&new->inode_hash[i]);
}