From a0c5efcf2cb2be5c9736c75af7a6d8754a101bf5 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 21 Dec 2011 10:43:28 +0530 Subject: features/posix-acl: handle fini for features/posix-acl Signed-off-by: shishir gowda Change-Id: I6cd3a9c3a513cc2a998b82610613bbfa0622eec4 BUG: 767862 Reviewed-on: http://review.gluster.com/811 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/system/posix-acl/src/posix-acl.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'xlators/system') 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; } -- cgit