summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.c
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-04-07 11:49:00 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-04-08 03:08:19 -0700
commit24591071a3c6a4362b8bb6818f42d3b7ec176342 (patch)
treeab76efebf25a422266419ee0527c281fb38e96a9 /xlators/cluster/afr/src/afr.c
parent73739935f511e431a64232c9b737342c7ba859e7 (diff)
cluster/afr: Cleanup fd ctx in releasedir cbk
Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 805 (memory leak in afr) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=805
Diffstat (limited to 'xlators/cluster/afr/src/afr.c')
-rw-r--r--xlators/cluster/afr/src/afr.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 18cff07663c..f176ebe7944 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -1424,12 +1424,11 @@ out:
int
-afr_release (xlator_t *this, fd_t *fd)
+afr_cleanup_fd_ctx (xlator_t *this, fd_t *fd)
{
- uint64_t ctx;
- afr_fd_ctx_t * fd_ctx;
-
- int ret = 0;
+ uint64_t ctx = 0;
+ afr_fd_ctx_t *fd_ctx = NULL;
+ int ret = 0;
ret = fd_ctx_get (fd, this, &ctx);
@@ -1456,6 +1455,15 @@ out:
}
+int
+afr_release (xlator_t *this, fd_t *fd)
+{
+ afr_cleanup_fd_ctx (this, fd);
+
+ return 0;
+}
+
+
/* {{{ fsync */
int