summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/graph.c2
-rw-r--r--libglusterfs/src/xlator.c9
-rw-r--r--xlators/features/shard/src/shard.c3
3 files changed, 12 insertions, 2 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
index cb1c0017cf1..aea74a5edad 100644
--- a/libglusterfs/src/graph.c
+++ b/libglusterfs/src/graph.c
@@ -1401,7 +1401,7 @@ glusterfs_graph_cleanup(void *arg)
pthread_mutex_lock(&ctx->cleanup_lock);
{
- glusterfs_graph_fini(graph);
+ glusterfs_graph_deactivate(graph);
glusterfs_graph_destroy(graph);
}
pthread_mutex_unlock(&ctx->cleanup_lock);
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 8df45beb9a3..9906809f7aa 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -659,6 +659,7 @@ xlator_fini_rec(xlator_t *xl)
trav = trav->next;
}
+ xl->cleanup_starting = 1;
if (xl->init_succeeded) {
if (xl->fini) {
old_THIS = THIS;
@@ -666,8 +667,14 @@ xlator_fini_rec(xlator_t *xl)
xl->fini(xl);
- if (xl->local_pool)
+ if (xl->local_pool) {
mem_pool_destroy(xl->local_pool);
+ xl->local_pool = NULL;
+ }
+ if (xl->itable) {
+ inode_table_destroy(xl->itable);
+ xl->itable = NULL;
+ }
THIS = old_THIS;
} else {
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index 6e78e967214..2b6b2513019 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -6788,6 +6788,9 @@ fini(xlator_t *this)
GF_VALIDATE_OR_GOTO("shard", this, out);
+ /*Itable was not created by shard, hence setting to NULL.*/
+ this->itable = NULL;
+
mem_pool_destroy(this->local_pool);
this->local_pool = NULL;