|
|
f338ef |
From 21f376939f03f91214218c485e7d3a2848dae4b2 Mon Sep 17 00:00:00 2001
|
|
|
f338ef |
From: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
f338ef |
Date: Thu, 11 Jul 2019 12:43:44 +0530
|
|
|
f338ef |
Subject: [PATCH 231/255] Revert "graph/shd: Use top down approach while
|
|
|
f338ef |
cleaning xlator"
|
|
|
f338ef |
|
|
|
f338ef |
This reverts commit b963fa8bb71963127147d33bf609f439dd5bd107.
|
|
|
f338ef |
|
|
|
f338ef |
Label : DOWNSTREAM ONLY
|
|
|
f338ef |
|
|
|
f338ef |
BUG: 1471742
|
|
|
f338ef |
Change-Id: Ifb8056395c5988cf7c484891bea052f5415bf9da
|
|
|
f338ef |
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
|
|
|
f338ef |
Reviewed-on: https://code.engineering.redhat.com/gerrit/175941
|
|
|
f338ef |
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
|
f338ef |
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
|
f338ef |
---
|
|
|
f338ef |
libglusterfs/src/graph.c | 10 +---------
|
|
|
f338ef |
xlators/features/bit-rot/src/stub/bit-rot-stub.c | 1 -
|
|
|
f338ef |
xlators/features/changelog/src/changelog.c | 1 -
|
|
|
f338ef |
xlators/features/cloudsync/src/cloudsync.c | 4 +---
|
|
|
f338ef |
xlators/features/index/src/index.c | 1 -
|
|
|
f338ef |
xlators/features/quiesce/src/quiesce.c | 1 -
|
|
|
f338ef |
xlators/features/read-only/src/worm.c | 1 -
|
|
|
f338ef |
xlators/features/sdfs/src/sdfs.c | 1 -
|
|
|
f338ef |
xlators/features/selinux/src/selinux.c | 2 --
|
|
|
f338ef |
xlators/features/trash/src/trash.c | 1 -
|
|
|
f338ef |
10 files changed, 2 insertions(+), 21 deletions(-)
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c
|
|
|
f338ef |
index 172dc61..5b95fd6 100644
|
|
|
f338ef |
--- a/libglusterfs/src/graph.c
|
|
|
f338ef |
+++ b/libglusterfs/src/graph.c
|
|
|
f338ef |
@@ -1193,14 +1193,6 @@ glusterfs_graph_fini(glusterfs_graph_t *graph)
|
|
|
f338ef |
if (trav->init_succeeded) {
|
|
|
f338ef |
trav->cleanup_starting = 1;
|
|
|
f338ef |
trav->fini(trav);
|
|
|
f338ef |
- if (trav->local_pool) {
|
|
|
f338ef |
- mem_pool_destroy(trav->local_pool);
|
|
|
f338ef |
- trav->local_pool = NULL;
|
|
|
f338ef |
- }
|
|
|
f338ef |
- if (trav->itable) {
|
|
|
f338ef |
- inode_table_destroy(trav->itable);
|
|
|
f338ef |
- trav->itable = NULL;
|
|
|
f338ef |
- }
|
|
|
f338ef |
trav->init_succeeded = 0;
|
|
|
f338ef |
}
|
|
|
f338ef |
trav = trav->next;
|
|
|
f338ef |
@@ -1402,7 +1394,7 @@ glusterfs_graph_cleanup(void *arg)
|
|
|
f338ef |
|
|
|
f338ef |
pthread_mutex_lock(&ctx->cleanup_lock);
|
|
|
f338ef |
{
|
|
|
f338ef |
- glusterfs_graph_fini(graph);
|
|
|
f338ef |
+ glusterfs_graph_deactivate(graph);
|
|
|
f338ef |
glusterfs_graph_destroy(graph);
|
|
|
f338ef |
}
|
|
|
f338ef |
pthread_mutex_unlock(&ctx->cleanup_lock);
|
|
|
f338ef |
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
f338ef |
index 03446be..3f48a4b 100644
|
|
|
f338ef |
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
f338ef |
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
|
|
|
f338ef |
@@ -185,7 +185,6 @@ cleanup_lock:
|
|
|
f338ef |
pthread_mutex_destroy(&priv->lock);
|
|
|
f338ef |
free_mempool:
|
|
|
f338ef |
mem_pool_destroy(priv->local_pool);
|
|
|
f338ef |
- priv->local_pool = NULL;
|
|
|
f338ef |
free_priv:
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
this->private = NULL;
|
|
|
f338ef |
diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c
|
|
|
f338ef |
index 2862d1e..d9025f3 100644
|
|
|
f338ef |
--- a/xlators/features/changelog/src/changelog.c
|
|
|
f338ef |
+++ b/xlators/features/changelog/src/changelog.c
|
|
|
f338ef |
@@ -2790,7 +2790,6 @@ cleanup_options:
|
|
|
f338ef |
changelog_freeup_options(this, priv);
|
|
|
f338ef |
cleanup_mempool:
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
cleanup_priv:
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
error_return:
|
|
|
f338ef |
diff --git a/xlators/features/cloudsync/src/cloudsync.c b/xlators/features/cloudsync/src/cloudsync.c
|
|
|
f338ef |
index 0ad987e..26e512c 100644
|
|
|
f338ef |
--- a/xlators/features/cloudsync/src/cloudsync.c
|
|
|
f338ef |
+++ b/xlators/features/cloudsync/src/cloudsync.c
|
|
|
f338ef |
@@ -200,10 +200,8 @@ cs_init(xlator_t *this)
|
|
|
f338ef |
|
|
|
f338ef |
out:
|
|
|
f338ef |
if (ret == -1) {
|
|
|
f338ef |
- if (this->local_pool) {
|
|
|
f338ef |
+ if (this->local_pool)
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
- }
|
|
|
f338ef |
|
|
|
f338ef |
cs_cleanup_private(priv);
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
|
|
|
f338ef |
index 4ece7ff..2f2a6d0 100644
|
|
|
f338ef |
--- a/xlators/features/index/src/index.c
|
|
|
f338ef |
+++ b/xlators/features/index/src/index.c
|
|
|
f338ef |
@@ -2478,7 +2478,6 @@ out:
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
this->private = NULL;
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
}
|
|
|
f338ef |
|
|
|
f338ef |
if (attr_inited)
|
|
|
f338ef |
diff --git a/xlators/features/quiesce/src/quiesce.c b/xlators/features/quiesce/src/quiesce.c
|
|
|
f338ef |
index 06f58c9..bfd1116 100644
|
|
|
f338ef |
--- a/xlators/features/quiesce/src/quiesce.c
|
|
|
f338ef |
+++ b/xlators/features/quiesce/src/quiesce.c
|
|
|
f338ef |
@@ -2536,7 +2536,6 @@ fini(xlator_t *this)
|
|
|
f338ef |
this->private = NULL;
|
|
|
f338ef |
|
|
|
f338ef |
mem_pool_destroy(priv->local_pool);
|
|
|
f338ef |
- priv->local_pool = NULL;
|
|
|
f338ef |
LOCK_DESTROY(&priv->lock);
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
out:
|
|
|
f338ef |
diff --git a/xlators/features/read-only/src/worm.c b/xlators/features/read-only/src/worm.c
|
|
|
f338ef |
index 7d13180..24196f8 100644
|
|
|
f338ef |
--- a/xlators/features/read-only/src/worm.c
|
|
|
f338ef |
+++ b/xlators/features/read-only/src/worm.c
|
|
|
f338ef |
@@ -569,7 +569,6 @@ fini(xlator_t *this)
|
|
|
f338ef |
mem_put(priv);
|
|
|
f338ef |
this->private = NULL;
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
out:
|
|
|
f338ef |
return;
|
|
|
f338ef |
}
|
|
|
f338ef |
diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c
|
|
|
f338ef |
index 164c632..f0247fd 100644
|
|
|
f338ef |
--- a/xlators/features/sdfs/src/sdfs.c
|
|
|
f338ef |
+++ b/xlators/features/sdfs/src/sdfs.c
|
|
|
f338ef |
@@ -1429,7 +1429,6 @@ void
|
|
|
f338ef |
fini(xlator_t *this)
|
|
|
f338ef |
{
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
return;
|
|
|
f338ef |
}
|
|
|
f338ef |
|
|
|
f338ef |
diff --git a/xlators/features/selinux/src/selinux.c b/xlators/features/selinux/src/selinux.c
|
|
|
f338ef |
index ce5fc90..58b4c5d 100644
|
|
|
f338ef |
--- a/xlators/features/selinux/src/selinux.c
|
|
|
f338ef |
+++ b/xlators/features/selinux/src/selinux.c
|
|
|
f338ef |
@@ -256,7 +256,6 @@ out:
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
}
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
}
|
|
|
f338ef |
return ret;
|
|
|
f338ef |
}
|
|
|
f338ef |
@@ -285,7 +284,6 @@ fini(xlator_t *this)
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
|
|
|
f338ef |
return;
|
|
|
f338ef |
}
|
|
|
f338ef |
diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c
|
|
|
f338ef |
index eb5007b..d668436 100644
|
|
|
f338ef |
--- a/xlators/features/trash/src/trash.c
|
|
|
f338ef |
+++ b/xlators/features/trash/src/trash.c
|
|
|
f338ef |
@@ -2523,7 +2523,6 @@ out:
|
|
|
f338ef |
GF_FREE(priv);
|
|
|
f338ef |
}
|
|
|
f338ef |
mem_pool_destroy(this->local_pool);
|
|
|
f338ef |
- this->local_pool = NULL;
|
|
|
f338ef |
}
|
|
|
f338ef |
return ret;
|
|
|
f338ef |
}
|
|
|
f338ef |
--
|
|
|
f338ef |
1.8.3.1
|
|
|
f338ef |
|