14f8ab
From 5c85ce7363b658bc8fa643742626109efe3ade0c Mon Sep 17 00:00:00 2001
14f8ab
From: Mohammed Rafi KC <rkavunga@redhat.com>
14f8ab
Date: Thu, 11 Jul 2019 12:44:04 +0530
14f8ab
Subject: [PATCH 233/255] Revert "graph/shd: Use glusterfs_graph_deactivate to
14f8ab
 free the xl rec"
14f8ab
14f8ab
This reverts commit 8cc6d8af00303c445b94715c92fe9e3e01edb867.
14f8ab
14f8ab
BUG: 1471742
14f8ab
Change-Id: Ib90fe89b85f4143db29702338decec76c83872bc
14f8ab
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/175942
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 libglusterfs/src/graph.c           | 2 +-
14f8ab
 libglusterfs/src/xlator.c          | 9 +--------
14f8ab
 xlators/features/shard/src/shard.c | 3 ---
14f8ab
 3 files changed, 2 insertions(+), 12 deletions(-)
14f8ab
14f8ab
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
14f8ab
index 5b95fd6..27d9335 100644
14f8ab
--- a/libglusterfs/src/graph.c
14f8ab
+++ b/libglusterfs/src/graph.c
14f8ab
@@ -1394,7 +1394,7 @@ glusterfs_graph_cleanup(void *arg)
14f8ab
 
14f8ab
     pthread_mutex_lock(&ctx->cleanup_lock);
14f8ab
     {
14f8ab
-        glusterfs_graph_deactivate(graph);
14f8ab
+        glusterfs_graph_fini(graph);
14f8ab
         glusterfs_graph_destroy(graph);
14f8ab
     }
14f8ab
     pthread_mutex_unlock(&ctx->cleanup_lock);
14f8ab
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
14f8ab
index d9d3441..71e1ed4 100644
14f8ab
--- a/libglusterfs/src/xlator.c
14f8ab
+++ b/libglusterfs/src/xlator.c
14f8ab
@@ -659,7 +659,6 @@ xlator_fini_rec(xlator_t *xl)
14f8ab
         trav = trav->next;
14f8ab
     }
14f8ab
 
14f8ab
-    xl->cleanup_starting = 1;
14f8ab
     if (xl->init_succeeded) {
14f8ab
         if (xl->fini) {
14f8ab
             old_THIS = THIS;
14f8ab
@@ -667,14 +666,8 @@ xlator_fini_rec(xlator_t *xl)
14f8ab
 
14f8ab
             xl->fini(xl);
14f8ab
 
14f8ab
-            if (xl->local_pool) {
14f8ab
+            if (xl->local_pool)
14f8ab
                 mem_pool_destroy(xl->local_pool);
14f8ab
-                xl->local_pool = NULL;
14f8ab
-            }
14f8ab
-            if (xl->itable) {
14f8ab
-                inode_table_destroy(xl->itable);
14f8ab
-                xl->itable = NULL;
14f8ab
-            }
14f8ab
 
14f8ab
             THIS = old_THIS;
14f8ab
         } else {
14f8ab
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
14f8ab
index 31c7eec..b248767 100644
14f8ab
--- a/xlators/features/shard/src/shard.c
14f8ab
+++ b/xlators/features/shard/src/shard.c
14f8ab
@@ -6785,9 +6785,6 @@ fini(xlator_t *this)
14f8ab
 
14f8ab
     GF_VALIDATE_OR_GOTO("shard", this, out);
14f8ab
 
14f8ab
-    /*Itable was not created by shard, hence setting to NULL.*/
14f8ab
-    this->itable = NULL;
14f8ab
-
14f8ab
     mem_pool_destroy(this->local_pool);
14f8ab
     this->local_pool = NULL;
14f8ab
 
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab