summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/storage/posix/src/posix-common.c')
-rw-r--r--xlators/storage/posix/src/posix-common.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c
index c17534536d2..64ab34c15c0 100644
--- a/xlators/storage/posix/src/posix-common.c
+++ b/xlators/storage/posix/src/posix-common.c
@@ -1110,13 +1110,12 @@ posix_fini (xlator_t *this)
struct posix_private *priv = this->private;
if (!priv)
return;
- LOCK (&priv->lock);
- if (priv->health_check_active) {
+ this->private = NULL;
+ if (priv->health_check) {
priv->health_check_active = _gf_false;
pthread_cancel (priv->health_check);
priv->health_check = 0;
}
- UNLOCK (&priv->lock);
if (priv->disk_space_check) {
priv->disk_space_check_active = _gf_false;
pthread_cancel (priv->disk_space_check);
@@ -1141,7 +1140,6 @@ posix_fini (xlator_t *this)
GF_FREE (priv->hostname);
GF_FREE (priv->trash_path);
GF_FREE (priv);
- this->private = NULL;
return;
}