summaryrefslogtreecommitdiffstats
path: root/xlators/system
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-12-21 10:43:28 +0530
committerVijay Bellur <vijay@gluster.com>2011-12-26 02:49:31 -0800
commita0c5efcf2cb2be5c9736c75af7a6d8754a101bf5 (patch)
treeab55d58182f541bf9188e6364f68ca4b4a47a569 /xlators/system
parent4511ed196f94f639846b899e6b58f5f6af3fa668 (diff)
features/posix-acl: handle fini for features/posix-acl
Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: I6cd3a9c3a513cc2a998b82610613bbfa0622eec4 BUG: 767862 Reviewed-on: http://review.gluster.com/811 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com>
Diffstat (limited to 'xlators/system')
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index a0a47134a..7acd1b5f0 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -1944,6 +1944,30 @@ err:
int
fini (xlator_t *this)
{
+ struct posix_acl_conf *conf = NULL;
+ struct posix_acl *minacl = NULL;
+
+ conf = this->private;
+ if (!conf)
+ return 0;
+ this->private = NULL;
+
+ minacl = conf->minimal_acl;
+
+ LOCK (&conf->acl_lock);
+ {
+ conf->minimal_acl = NULL;
+ }
+ UNLOCK (&conf->acl_lock);
+
+ LOCK_DESTROY (&conf->acl_lock);
+
+ if (minacl)
+ GF_FREE (minacl);
+
+ if (conf)
+ GF_FREE (conf);
+
return 0;
}