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