summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/upcall/src/upcall.c9
-rw-r--r--xlators/features/upcall/src/upcall.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c
index a007d694099..c49a3fd8796 100644
--- a/xlators/features/upcall/src/upcall.c
+++ b/xlators/features/upcall/src/upcall.c
@@ -2091,7 +2091,7 @@ reconfigure (xlator_t *this, dict_t *options)
" Disabling cache_invalidation",
strerror(errno));
}
- priv->reaper_init_done = 1;
+ priv->reaper_init_done = _gf_true;
}
out:
@@ -2123,7 +2123,7 @@ init (xlator_t *this)
this->private = priv;
priv->fini = 0;
- priv->reaper_init_done = 0;
+ priv->reaper_init_done = _gf_false;
this->local_pool = mem_pool_new (upcall_local_t, 512);
ret = 0;
@@ -2138,7 +2138,7 @@ init (xlator_t *this)
" Disabling cache_invalidation",
strerror(errno));
}
- priv->reaper_init_done = 1;
+ priv->reaper_init_done = _gf_true;
}
out:
if (ret) {
@@ -2161,7 +2161,8 @@ fini (xlator_t *this)
priv->fini = 1;
- pthread_join (priv->reaper_thr, NULL);
+ if (priv->reaper_init_done)
+ pthread_join (priv->reaper_thr, NULL);
LOCK_DESTROY (&priv->inode_ctx_lk);
diff --git a/xlators/features/upcall/src/upcall.h b/xlators/features/upcall/src/upcall.h
index 1616825580f..f86849341ec 100644
--- a/xlators/features/upcall/src/upcall.h
+++ b/xlators/features/upcall/src/upcall.h
@@ -49,7 +49,7 @@ struct _upcall_private_t {
int32_t cache_invalidation_timeout;
struct list_head inode_ctx_list;
gf_lock_t inode_ctx_lk;
- int32_t reaper_init_done;
+ gf_boolean_t reaper_init_done;
pthread_t reaper_thr;
int32_t fini;
};