From cd6ffa93dc2a3cb1fcc5438086aebc54f368c2e9 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Wed, 29 Oct 2014 09:12:46 -0400 Subject: libgfapi: Wait for GF_EVENT_CHILD_DOWN in glfs_fini() Whenever glfs_fini() is being called, currently no check is made inside the function to determine whether the child is already down or not. This patch will wait for GF_EVENT_CHILD_DOWN for the active subvol and then exits. TBD: Apart from the active subvol, wait for other CHILD_DOWN events generated through operations like volume set in future. Change-Id: I81c64ac07b463bfed48bf306f9e8f46ba0f0a76f BUG: 1153610 Signed-off-by: Anoop C S Reviewed-on: http://review.gluster.org/9060 Reviewed-by: Shyamsundar Ranganathan Tested-by: Gluster Build System Reviewed-by: Raghavendra G Reviewed-by: Niels de Vos --- libglusterfs/src/graph.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 52e79ab68cd..f6db5557a33 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -765,12 +765,12 @@ glusterfs_graph_reconfigure (glusterfs_graph_t *oldgraph, int glusterfs_graph_destroy (glusterfs_graph_t *graph) { - xlator_tree_free (graph->first); + GF_VALIDATE_OR_GOTO ("graph", graph, out); - if (graph) { - list_del_init (&graph->list); - GF_FREE (graph); - } + xlator_tree_free (graph->first); + list_del_init (&graph->list); + GF_FREE (graph); +out: return 0; } -- cgit