diff options
author | Amar Tumballi <amar@gluster.com> | 2010-08-31 01:17:56 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-08-31 00:06:59 -0700 |
commit | e1afe36eb3b006be12e7d7a5b87ff181c6da1250 (patch) | |
tree | 4218f6b58813b6722748da87b214937932e530fb /glusterfsd | |
parent | ddafbca363a5b0f0d8d1f11aa35e250d2c2c91bd (diff) |
fix a crash in cleanup_and_exit ()v3.1.0qa12
* fini() was being called without proper 'THIS' being set.
* in protocol/client, a frame was getting created after frame
pool was destroyed
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1030 (mount directory is not unmounted after killing glusterfs process)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1030
Diffstat (limited to 'glusterfsd')
-rw-r--r-- | glusterfsd/src/glusterfsd.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 9b343f5909d..bce5bfd4ca5 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -647,27 +647,31 @@ cleanup_and_exit (int signum) gf_log ("glusterfsd", GF_LOG_NORMAL, "shutting down"); - tmp_pool = ctx->pool; - mem_pool_destroy (tmp_pool->frame_mem_pool); - mem_pool_destroy (tmp_pool->stack_mem_pool); - tmp_pool = NULL; - mem_pool_destroy (ctx->stub_mem_pool); - /* Call fini() of FUSE xlator first */ trav = ctx->master; - if (trav && trav->fini) + if (trav && trav->fini) { + THIS = trav; trav->fini (trav); + } /* call fini() of each xlator */ trav = NULL; if (ctx->active) trav = ctx->active->top; while (trav) { - if (trav->fini) + if (trav->fini) { + THIS = trav; trav->fini (trav); + } trav = trav->next; } + tmp_pool = ctx->pool; + mem_pool_destroy (tmp_pool->frame_mem_pool); + mem_pool_destroy (tmp_pool->stack_mem_pool); + tmp_pool = NULL; + mem_pool_destroy (ctx->stub_mem_pool); + glusterfs_pidfile_cleanup (ctx); exit (0); |