diff options
Diffstat (limited to 'xlators/features/leases/src/leases.c')
-rw-r--r-- | xlators/features/leases/src/leases.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index ebee682a685..d4fdbfb7ea1 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -1041,17 +1041,14 @@ fini (xlator_t *this) priv->fini = _gf_true; pthread_cond_broadcast (&priv->cond); - if (priv->recall_thr) { - gf_thread_cleanup_xint (priv->recall_thr); - priv->recall_thr = 0; - priv->inited_recall_thr = _gf_false; - } + pthread_join (priv->recall_thr, NULL); + + priv->inited_recall_thr = _gf_false; GF_FREE (priv); - if (this->ctx->tw) { - glusterfs_ctx_tw_put (this->ctx); - this->ctx->tw = NULL; - } + + glusterfs_ctx_tw_put (this->ctx); + return 0; } |