summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-08-10 16:58:38 +0530
committerVijay Bellur <vijay@gluster.com>2011-08-25 12:01:08 -0700
commitcd567c063ec25b280d3fb5686a69b068c2d6d6df (patch)
tree636ed83dc9b7e4d7e019dcfc59bbc722f066e2e6 /xlators/nfs/server/src
parent9c68f3b53ffd27ea03e90da883c43e84bf94dd15 (diff)
mem-pool: Make mem-pool ptr avialable in ptr
The header of the ptr returned from mem-pool will now store the mem-pool ptr it belongs to. mem_put will now take only the pointer to be freed. Also, changing MALLOC call to GF_CALLOC in mem_get when we run out of entries in mem-pool. This also will have the header information saved. Change-Id: I3de182663a7f5b49c9e9425e9531775b70bdff67 BUG: 3390 Reviewed-on: http://review.gluster.com/205 Reviewed-by: Amar Tumballi <amar@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/nfs/server/src')
-rw-r--r--xlators/nfs/server/src/nfs-fops.c2
-rw-r--r--xlators/nfs/server/src/nfs3.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/nfs/server/src/nfs-fops.c b/xlators/nfs/server/src/nfs-fops.c
index 5280139cb..236c411e2 100644
--- a/xlators/nfs/server/src/nfs-fops.c
+++ b/xlators/nfs/server/src/nfs-fops.c
@@ -74,7 +74,7 @@ nfs_fop_local_wipe (xlator_t *nfsx, struct nfs_fop_local *l)
if (l->dictgfid)
dict_unref (l->dictgfid);
- mem_put (nfs->foppool, l);
+ mem_put (l);
return;
}
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index 6c0d1e2ef..013f6d80e 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -429,7 +429,7 @@ nfs3_call_state_wipe (nfs3_call_state_t *cs)
if (cs->iobref)
iobref_unref (cs->iobref);
memset (cs, 0, sizeof (*cs));
- mem_put (nfs3->localpool, cs);
+ mem_put (cs);
/* Already refd by fd_lookup, so no need to ref again. */
}