summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c2
3 files changed, 6 insertions, 8 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index e33875ffc..8f2f0adb2 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -944,14 +944,13 @@ dht_start_rebalance_task (xlator_t *this, call_frame_t *frame)
}
int
-gf_listener_stop (void)
+gf_listener_stop (xlator_t *this)
{
glusterfs_ctx_t *ctx = NULL;
cmd_args_t *cmd_args = NULL;
int ret = 0;
- xlator_t *this = NULL;
- ctx = glusterfs_ctx_get ();
+ ctx = this->ctx;
GF_ASSERT (ctx);
cmd_args = &ctx->cmd_args;
if (cmd_args->sock_file) {
@@ -962,7 +961,6 @@ gf_listener_stop (void)
}
if (ret) {
- this = THIS;
gf_log (this->name, GF_LOG_ERROR, "Failed to unlink listener "
"socket %s, error: %s", cmd_args->sock_file,
strerror (errno));
@@ -1431,7 +1429,7 @@ gf_defrag_start_crawl (void *data)
if (!this)
goto out;
- ctx = glusterfs_ctx_get ();
+ ctx = this->ctx;
if (!ctx)
goto out;
@@ -1528,7 +1526,7 @@ out:
static int
gf_defrag_done (int ret, call_frame_t *sync_frame, void *data)
{
- gf_listener_stop();
+ gf_listener_stop (sync_frame->this);
STACK_DESTROY (sync_frame->root);
kill (getpid(), SIGTERM);
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 629829283..bc265de67 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -578,7 +578,7 @@ glusterd_op_begin_synctask (rpcsvc_request_t *req, glusterd_op_t op,
goto out;
}
- ctx = glusterfs_ctx_get ();
+ ctx = THIS->ctx;
ret = synctask_new (ctx->env, gd_sync_task_begin,
gd_sync_task_completion,
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 3a620ac7e..d65de5f69 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -4447,7 +4447,7 @@ init (xlator_t *this_xl)
if (this_xl->options == NULL)
return -1;
- ctx = glusterfs_ctx_get ();
+ ctx = this_xl->ctx;
if (!ctx)
return -1;