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