From e8f8d16fc4b8e5be48f4d7c9ff9d170934ffb7fc Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Mon, 24 Jun 2019 15:49:04 +0530 Subject: graph/shd: Use glusterfs_graph_deactivate to free the xl rec We were using glusterfs_graph_fini to free the xl rec from glusterfs_process_volfp as well as glusterfs_graph_cleanup. Instead we can use glusterfs_graph_deactivate, which is does fini as well as other common rec free. Change-Id: Ie4a5f2771e5254aa5ed9f00c3672a6d2cc8e4bc1 Updates: bz#1716695 Signed-off-by: Mohammed Rafi KC --- libglusterfs/src/xlator.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'libglusterfs/src/xlator.c') 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 { -- cgit