From f9431f330e8f304e82d9b1443018987a926d56b6 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 5 Aug 2010 04:00:14 +0000 Subject: mem pool for fd_t Ran posix compliance test and sanity test Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329 --- libglusterfs/src/inode.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libglusterfs/src/inode.c') 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; ihashsize; i++) { INIT_LIST_HEAD (&new->inode_hash[i]); } -- cgit