summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e285a499a5c..6eaa5f6d05a 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4647,6 +4647,8 @@ glusterd_delete_stale_volume (glusterd_volinfo_t *stale_volinfo,
GF_ASSERT (stale_volinfo);
GF_ASSERT (valid_volinfo);
+ this = THIS;
+ GF_ASSERT (this);
/* Copy snap_volumes list from stale_volinfo to valid_volinfo */
valid_volinfo->snap_count = 0;
@@ -6822,12 +6824,12 @@ glusterd_brick_start (glusterd_volinfo_t *volinfo,
int ret = -1;
xlator_t *this = NULL;
- if ((!brickinfo) || (!volinfo))
- goto out;
-
this = THIS;
GF_ASSERT (this);
+ if ((!brickinfo) || (!volinfo))
+ goto out;
+
if (uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {
@@ -7821,14 +7823,14 @@ glusterd_brick_stop (glusterd_volinfo_t *volinfo,
xlator_t *this = NULL;
glusterd_conf_t *conf = NULL;
- if ((!brickinfo) || (!volinfo))
- goto out;
-
this = THIS;
GF_ASSERT (this);
conf = this->private;
GF_ASSERT (conf);
+ if ((!brickinfo) || (!volinfo))
+ goto out;
+
if (uuid_is_null (brickinfo->uuid)) {
ret = glusterd_resolve_brick (brickinfo);
if (ret) {